📅  最后修改于: 2022-03-11 15:03:07.152000             🧑  作者: Mango
let string = "1";
let number = 1;
if (parseInt(string) === number){
// STRING AND NUMBER MATCHES
}
if (string == number){
// STRING AND NUMBER MATCHES ALSO BECAUSE == instead of ===, means it won't compare datasets, only the content
}