If you scroll to the bottom of this page https://eloquentjavascript.net/04_data.html you will see ‘Display Hints’ under the heading ‘A List’. Click that and then you will see hints where there is a line of code that I don’t understand:
Code:
for (let node = list; node; node = node.rest) {}
Why is the 2nd part of the for loop say nothing but ‘node’? Is this the same as saying node == true?
The last part of the for loop says ‘node.rest’. What does that do? Does .rest mean anything specific?
The book gives an explanation but it’s not enough for me to grasp it so I’m hoping someone can break it down in a simple manner