Linked List class in Javascript

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.

You can see the implementation here

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.