Add javascript solution to challenge 18