Computer Science fundamentals implemented using JavaScript