ThisĀ is an exercise in using the object oriented concepts in Javascript to implement a doubly linked list.
There is a class called Node which encapsulates the actual node in the list. The linked list is implemented as a global object with class variables and methods to:
- Add a node
- Remove a node
- Search for a node
- Sort the list in ascending order
- Display the entire list
The Node object simply stores a string. There is scope for further improvement, as always. The source is easily available by viewing the page source. Any comments and recommendations for changes or improvements are welcome.
Leave a Reply