When I want to call the function in the console.log and putting no value in the function, Why the “else” value displayed in the output?
Hi and welcome to the forum!
When you call the function with no arguments, you are in effect calling the function with all arguments
undefined. The value
undefined is not
< 1 or
< 2, so the else clause triggers.
For future reference, it is very difficult to help from screenshots. Please include copy-pasted code in future posts.