JavaScript | Linked List | Question 2

Last Updated :
Discuss
Comments

In JavaScript, which of the following is the correct way to define a node for a singly linked list?

{data: 10, prevNode: null}

{nodeValue: 10, nextNode: null}

{value: 10, prevNode: null}

{value: 10, nextNode: null}

Share your thoughts in the comments