Hi! Thanks for the replies. Yes, I did try looking through the documentation online. I saw a few different ways of approaching the problem, but some of them involved code that I haven't learned about yet. I tried rearranging my if/else if statements and that did the trick...
This comment is hidden because it contains spoiler information about the solution
Hi! Thanks for the replies. Yes, I did try looking through the documentation online. I saw a few different ways of approaching the problem, but some of them involved code that I haven't learned about yet. I tried rearranging my if/else if statements and that did the trick...
Have you tried to search for documentation online? Just something like "check empty array JavaScript", "check null array JavaScript"?
You're doing it wrong. Try reading the posts below.
P.S.: your current code works.
Apparently, a lot.
This comment is hidden because it contains spoiler information about the solution