Javascript like C Linked Lists utility