On the problem of judging whether it is a digital error or not

topic description

write an expression that results in whether 2018 is a leap year.

related codes

function isLeapYear(year){
    if(typeof year != "number"){
        return console.log("");
    }else{
        if((year%4==0)&&(year%100!=0)||(year%400==0)){
            return console.log(year+"");
        }else{
            return console.log(year+"");
        }
    }
}
isLeapYear(asd);

what result do you expect? What is the error message actually seen?

according to my code, if the input is not a number, it will prompt "the input is not a number"
, but if you write asd directly in the value, it will report an error "ReferenceError: asd is not defined"
and add quotation marks. What is the reason? if you want to enter a value directly in it (without quotation marks), you will be prompted how to "enter a number instead of a number"

.
Feb.20,2022

  

prompts for input is not a number, haven't you already made a judgment in your function? The difference between asd without quotation marks and without quotation marks is as mentioned on the first floor.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ff8b-ea27.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ff8b-ea27.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?