javascript homework!

it is confusing...