Algorithms Implemented in JavaScript