A simple List implementation in js