a simple linked list in javascript