Committing problem 1 on Javascript