Home / Programming MCQs / JavaScript MCQs / Question

I

Indresh • 9.81K Points
Tutor III

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"

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.