Linked lists practice using both javascript and ruby