1. Non-variability of strings
After the string is defined, it will occupy the memory space, the Penguin the Memory Space (stack) can not be assigned a value.
2. Short Circuit operation
The && two operator returns the original value (original data type and original data) of the operand that participated in the operation.
At the end of the operation, returns the operand that caused the operation to end.
3. Ternary operator
Code1? Code2:code3; Different from If-else:
Returns the value of the Code2 or code3----code2,code3 can be replaced with an empty {};
Can't write Break,continue.
4.NaN
NaN! =nan,
Any mathematical operation in which Nan participates, the result is Nan
conditional expression with Nan participation: comparison operator >/>=/</<=/==/=== operation result is False
! ==/! = The result of the operation is true
<script>
var A;
Console.log (Boolean (nan>=4));
Console.log (Boolean (nan<4));
Console.log (Boolean (nan=4));
Console.log (Boolean (nan==4));
Console.log (Boolean (a=4));
Console.log (NaN);
Console.log (a);
if (Nan==nan) {
a = "Nan==nan";
}
var b;
if (Nan!==nan) {
b = "Nan!=nan";
}
Console.log (A + "\ n" +b);
</script>
5. JS simple data type conversion---special case demo
Data: 0, "", false,null,undefined, "123abc" etc
This is the entire content of this article to share, I hope you can enjoy