Classic data structures implemented in JavaScript