Should I create an error to check for a number and planet name?

The challenge asks the function to “expect earthWeight to be a number” and “expect planet to be a string”. Am I literally supposed to check for this with some kind of code? Or does it mean to just write the code with this expectation?

I am kind of curious if there is a way to do the first option, too, regardless of that is being asked.

yes

in a real world application, this can certainly be a good check.

1 Like