A

Admin • 833.24K Points
Coach

Q. What will the following JavaScript code snippet do? If not, what will be the error?

Code:
function letsfindcourse(lfc)
{
for (; lfc.next; lfc = lfc.next) ;
return lfc;
}
  • (A) No, this will result in a runtime error with the message Cannot use Linked List
  • (B) No, this will not iterate
  • (C) Yes, this will work
  • (D) No, this will throw an exception as only numerics can be used in a for loop
  • Correct Answer - Option(C)
  • Views: 22
  • Filed under category JavaScript
  • Hashtags:

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.

Be the first to start discuss.