πŸ“Š JavaScript
Q. If the following piece of JavaScript code is executed, will it work if not, what kind of possible error can occur?
Code:
function fun(o)  
{  
for(;o.next; oo =o.next);  
return o;  
} 
  • (A) Yes, it will work fine
  • (B) No, this will not iterate at all
  • (C) No, it will throw an exception as only numeric's can be used in a for loop
  • (D) No, it will produce a runtime error with the message "Cannot use Linked List"
πŸ’¬ Discuss
βœ… Correct Answer: (A) Yes, it will work fine

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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