If Else If Else - HINT us an else if for undefined


#1

If / else if / else

If you keep getting an error message remember that undefined is a correct type so there are four conditions that you need to account for

number = 3
number = 4
number = undefined
number = 'some string'

isNaN will fail for undefined so that needs it's own if else statement. This is not mentioned in the lesson.

#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.