Add JS solution problem 7