Add JavaScript solution problem 14