Add JavaScript solution problem 12