-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pr-7 #8
base: master
Are you sure you want to change the base?
Pr-7 #8
Conversation
Why did you change the name of the PR from "Node class" to "Pr-7"? I'd like to see "Add JavaScript Node class" once this is merged so it's clear. |
while (current != null) { | ||
console.log(current.value); | ||
current = current.getNext(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer to see this build up something like "1 -> 2 -> 3 -> null".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, Kaida. Good suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
} | ||
} | ||
|
||
export default Node; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing final newline.
let current = this; | ||
|
||
while (current != null) { | ||
console.log(current.value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this console.log need to be here?
printList() { | ||
let current = this; | ||
|
||
while (current != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be a little cleaner to say "while (current)"
while (current != null) { | |
while (current) { |
No description provided.