Q. Which of the following options would be the correct output for the given JavaScript code?

Code:
    var size=5;  
    var x=5;  
    var size=4;  
    for(var j=size;j>=0;j--)  
    {  
        console.log(x);  
        xx=x-2;  
    }  
  • (A) 5321
  • (B) 5555
  • (C) 531-1-3
  • (D) 531
πŸ’¬ Discuss
βœ… Correct Answer: (C) 531-1-3

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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