element
本身和对下一个node
的引用。想象一下你在康加舞线上。你的手掌握在线下的下一个人身上,你身后的人就会抓住你。你可以直接看到这个人,但是他们阻挡了前方其他人的视线。一个节点就像一个康加舞线上的人:他们知道自己是谁,他们只能看到下一个人,但他们并不知道前方或后方的其他人。 Kitten
和Puppy
,我们手动将Kitten
节点连接到Puppy
节点。创建Cat
和Dog
节点并手动将它们添加到该行。 Puppy
节点应该具有对Cat
节点的引用。
testString: 'assert(Puppy.next.element === "Cat", "Your Puppy
node should have a reference to a Cat
node.");'
- text: 您的Cat
节点应该具有对Dog
节点的引用。
testString: 'assert(Cat.next.element === "Dog", "Your Cat
node should have a reference to a Dog
node.");'
```