JS basic syntax

1. The operation of basic data types
follows the rules: operation is from left to right; any type of variable spliced ​​with a string type variable will be forced to be converted to string
2. JS commonly used class library Math
var numsArr = [10,212,3223 ,32];
var maxNum = Math.max(10,21,21);
var newMaxNum = Math.min.apply(this,numsArr);
3. this: all functions of this belong to that object, and this represents this object

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325809307&siteId=291194637