Guest User

Untitled

a guest
May 20th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. getAt(index) {
  2. let node = this.head
  3. let counter = 0
  4.  
  5. while (node) {
  6. if (index === counter) {
  7. return node
  8. }
  9. counter++
  10. node = node.next
  11. }
  12. return null;
  13. }
Add Comment
Please, Sign In to add comment