Affordplan Interview Question

Basic java scipt and puzzles