0
About algorithms Can i have the solution please ?šš¼š
for(var x = 2; x < 9; x++) { Consol.log(x); }
3 Answers
0
It's for loop in javascript
Syntex:
var x;
for(x = start ; x = end ; x += increment){
// your js code
}
Here in your case starting index is set to 2 and last index is 9-1 = 8 as x < 9 and increment is of +1
So your loop will iterate from 2 to 8 for x and console.log will print all the numbers ie 2,3,4,5,6,7,8
0
var msg = ācodingdojoā;
for(var x = 6; x < msg.length + 4; x++ )
{
console.log(x);
}
0
Thank you so much
Can you comblet the solution ?