Skip to content

Conversation

@CheezItMan
Copy link

No description provided.

printList() {
let current = this;

while (current != null) {

Choose a reason for hiding this comment

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

Nice and simple

}
}
}

Copy link

Choose a reason for hiding this comment

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

Code is easy to understand.

}
}

export default Node; No newline at end of file

Choose a reason for hiding this comment

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

Add New Line for Syntax

Copy link

@gyjin gyjin left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

@geli-gel geli-gel left a comment

Choose a reason for hiding this comment

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

You can set your code editor (probably) to automatically add newlines at the end to match style guidelines ... or is that just ruby???

this.value = value;
this.next = next;
}

Copy link

Choose a reason for hiding this comment

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

Nice! I remember constructors


setNext(next) {
this.next = next;
}
Copy link

Choose a reason for hiding this comment

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

should this explicitly return something?

}
}

export default Node; No newline at end of file
Copy link

Choose a reason for hiding this comment

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

add newline at end

}
}
}

Choose a reason for hiding this comment

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

Clear and appreciate the descriptive function names

let current = this;

while (current != null) {
console.log(current.value);
Copy link

Choose a reason for hiding this comment

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

using .getValue() might honor encapsulation more

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.

9 participants