C
cp
in Perl I would write a for loop as :
for $i ( 1..2 ) {
print "<p>$i</p>";
}
which would output:
<p>1</p>
<p>2</p>
In JavaScript I would write:
for (var i=1;i<3;i++) {
...
or is there an easier (or more idiomatic) way?
for $i ( 1..2 ) {
print "<p>$i</p>";
}
which would output:
<p>1</p>
<p>2</p>
In JavaScript I would write:
for (var i=1;i<3;i++) {
...
or is there an easier (or more idiomatic) way?