data structures with javascript