javascipt-Basics---Details that need attention:
1. Special values : NaN, Infinity, isNaN(), isFinite()
NaN:
Infinity:
isNaN(): Determine whether it is a number. If it is not a number, it returns true. If it is a number, it returns false.
The code is as follows:
This knowledge point is used a lot in JavaScript frameworks. a、
Copy code
The code is as follows:
Copy code
The code is as follows:case 'b':
window.alert("b"); //There is no break statement and no match is successful. At this time, the results are output
}
Copy code
case 1:
window.alert("b"); //There is no break statement. When the match is successful, no break statement will be found. At this time, b
}
5. Function call
func.js
Copy code
The code is as follows:
//Function without return value
var res=0;
}
Function call:
js supports functions with variable number of parameters