970 B
970 B
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
587d8251367417b2b2512c61 | Work with Nodes in a Linked List | 1 |
Description
undefined
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert(Puppy.next.element === "Cat", "Your <code>Puppy</code> node should have a reference to a <code>Cat</code> node.");'
- text: ''
testString: 'assert(Cat.next.element === "Dog", "Your <code>Cat</code> node should have a reference to a <code>Dog</code> node.");'
Challenge Seed
var Node = function(element){
this.element = element;
this.next = null;
};
var Kitten = new Node("Kitten");
var Puppy = new Node("Puppy");
Kitten.next = Puppy;
// only add code below this line
// test your code
console.log(Kitten.next);
Solution
// solution required