SURELY it's not a Level 1 course.
It truly makes no sense that you would have an assignment like this in a Level 1 course. But then we have the anomaly that you are being told to use alert( ) calls, which should be forbidden in anything beyond maybe the first half of a Level1 course.
I have to tell you, honestly, what you are being asked to do here is not *hard*, but it's certainly something that would take even an experienced JS programmer some measurable amount of time--at least an hour or two, and maybe more--to pull off with 100% compliance to the specs.
So if this is *NOT* a Level 1 course, then: Why the heck are you, who clearly hasn't yet successfully mastered even the first half of a Level 1 course, taking it? And why is the instructor having you use the "baby" techniques of a Level 1 course? Just makes no sense.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.