Skip to content

Conversation

@chelseadole
Copy link
Owner

No description provided.

iter.forEach(item => this.push(item));
}
else if (iter !== null) {
return 'LinkedList only takes arrays as inputs.';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should look up how to throw errors in Javascript

}
}

display() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if your linked list contains [4] -> [5] -> [6] this will display (4,5,6,). Handle that trailing comma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants