Added JS solution for problem 14