final solutions to JS morning challenge