linked list implemented in javascript