Implemented Javascript solution for 1.2. Implemented test script for 1.2.js. Solution 1.2.js is not strictly equivalent to the C++ solution.