Q. Which one of the given code will be equivalent for the following JavaScript code:

Code:
for(var p in o)  
console.log(o[p]);  
  • (A) for (var i = 1;i<a.length;i++) console.log(a[i]);
  • (B) for (var i = 0;i<a.length;i++) console.log(a[i]);
  • (C) for (int i = 0;i<a.length;i++) console.log(a[i]);
  • (D) for (var i = 0;i<= a.length;i++) console.log(a[i]);
πŸ’¬ Discuss
βœ… Correct Answer: (A) for (var i = 1;i<a.length;i++) console.log(a[i]);

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
214
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Indresh Gehalot
Publisher
πŸ“ˆ
88%
Success Rate