Added JS solution to problem 022