1, NaN is not a digital Infinity infinity
Alert (parseint ("DD")); // NaNalert (1/0); Infinity
2, logic or | | To return the first value that is not false
Alert (100| | 0); // - function Test (e) { = e| | {};}
3, eval () function, execute a section of JS code
var hello = "alert (' Hello ')"; eval (hello);
The 4,object class is the base class for all JavaScript classes, and it can dynamically add properties or methods
var New function() { alert (this= "I ' m Hello"; Obj.sayhello ();
5,javascript commonly used in the built-in methods parseint (), encodeURI () and so on.
Internal classes commonly used in 6,javascript Object number String Math Date
varI= 100;//I turn into binaryAlert (i.ToString (2));//1100100varstr = "Ah Wei";//<a href= "www.baidu.com/" > Ah wei </a>Alert (Str.link ("www.baidu.com/") ; alert (Math.random ()); //[0,1]varDate =NewDate ();//2016-9-3Alert (date.getfullyear () + "-" + (Date.getmonth () +1) + "-" +date.getdate ());//12:58:4Alert (date.gethours () + ":" +date.getminutes () + ":" +date.getseconds ()); alert (Date.gettime ());
7, array arrays
// Two array connection concat, array to string joinvar arr1 = [12,34]; var arr2 = ["SD", "Yang", ' Wei '];alert (Arr1.concat (ARR2)); Alert (Arr1.join (//[ Email protected]@@34
8, want to know what an object is, can print its construction
alert (arr1.constructor);
JavaScript Basics Review