data structures with JavaScript