Posted by: ghogay_moro June 16, 2016
Login in to Rate this Post:
0
?
i'd do this in scripting for similar needs -
I think the question asked to print 100 to 1:
for(i=100; i>0; i--) {
console.log(i);
}
and if you wanted 1 to 100:
for(i=1; i<101; i++) {
console.log(i);
}
wish all interview questions were as lame.
I think the question asked to print 100 to 1:
for(i=100; i>0; i--) {
console.log(i);
}
and if you wanted 1 to 100:
for(i=1; i<101; i++) {
console.log(i);
}
wish all interview questions were as lame.