PacktPublishing / Learning-JavaScript-Data-Structures-and-Algorithms-Third-Edition

Learning JavaScript Data Structures and Algorithms (Third Edition), published by Packt
MIT License
1.05k stars 428 forks source link

fixing wrong reading cause out of bounds #18

Closed Yamiqu closed 2 years ago

Yamiqu commented 2 years ago
this.getElementAt(this.size());

this line is reading out of bounds, will get return of undefined . Instead of getting the last element in the linked list as we expected

I also checked the insert implementation of other linked lists in the project , and didn't find this error. I think Its may be a typo or sth.