1. Data type: null and undefined differences?
Undefined refers to a primitive type that has no definition, and Null refers to an object that is not defined.
2. Array declaration: [' A ', 3, ' Hello ', true];
3. Control structure: for (var i=0; i<test.length; i++) {//...}
If object: var obj = {name: ' AA ', age:23};
For (var k in obj) {console.log (k+obj[k]);}
4. Object manipulation:
Str.length; STR.SUBSTR (2,3);
var aa =[' A ', ' B ', ' C ', ' d '];
var bb = ' a,b,c,d,e ';
object is merged into a string: Aa.join (', ');
The string is decomposed into objects: bb.split (', ');
Returns the location where the string appears: IndexOf (String);
Tolowercase//touppercase//replace (STR1,STR2);
Date object:
getFullYear ();//
GetMonth ()//
GetDate ();
GetHours ();
Getminutes ();
Getseconds ();
Getmilliseconds ();
Math Mathematical object:
Ceil (..); >= the smallest integer of this number.
Floor (..) <= the largest integer of this number
Min (d1,d2,d3); Returns the minimum value
Max (D1,D2,D3);
Random ();
JavaScript Basics 1