Solving three Javascript problems from Freecodecamp