1. JS data type: Number,string,boolean,null,undefine,object.
2. In the loop of data: The function of break is to interrupt all loops to execute the statement below the Loop statement. Continue jumps out of the current loop and executes the next loop statement. The loop finishes executing. The statement following the execution of the loop statement.
3. JS has 3 kinds of bullets: alert (msg) can only be used as the information cue box performance, confirm (msg) information prompts to do the operation, confirm or Cancel, prompt (Msg,text) display can prompt the user to enter the dialog box.
4. js function can be with parameters, without parameters. The parameters of the parameter are limited to four;
Naming rules Small Hump method: First letter lowercase after other words capitalized as getmsg ();
The function name preceded by "_" will generally default to a class (object) Private method such as _getname ();
With the parameter function, when making a call, the number of arguments can not be equal to the number of arguments, the value of the parameter not passed in Undefine instead. General or parameter all incoming good. Avoid trouble.
There is a function object that stores the parameters of the current function call in a manner similar to an array of argument.
such as calling GetName (EXPR1,EXPR2, ... );
Original function getname () {
var i = arguments[0];//equivalent to Expr1
。。。。
var in = argument "n" nth parameter exprn
}
This method can be used in cases where the number of parameters is not deterministic but is not recommended.
Some basic knowledge points about JS