Here is an example in ".ejs" template and its output
<%
var test = ['test1', 'test2', 'test3', 'test4']
for (var id in test) {
%>
<%
if (~~id === 0) {
%>
This Is A Test Title going only Once
<%
} else {
%>
<%
}
%>
<%= test[id] %>
<%_
}
_%>
Here is the output >>
This Is A Test Title going only Once
test1
test2
test3
test4
This Is A Test Title going only Once function () { return this[this.length - 1]; }
This Is A Test Title going only Once function (i) { return this[this.length - (1 + i)]; }
Not sure if I had a bug here, but why it prints the last two lines, can anyone help please?
I am using "2.3.4" version.
Here is an example in ".ejs" template and its output
<% var test = ['test1', 'test2', 'test3', 'test4'] for (var id in test) { %>