JavaScript | Linked List | Question 4

Last Updated :
Discuss
Comments

What happens if we try to access a node beyond the last node in a singly linked list?

An error will be thrown.

It will return null or undefined.

The program will crash.

It will result in an infinite loop.

Share your thoughts in the comments