JavaScript For Loop
- Consider the following code snippet.
for(var n in m)
console.log(m[n]);
The above code is equivalent to which code?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The in variable does the same task of traversing the array starting from the 0 index. The for/in loop makes it easy to do the same that we do using a for.