Output:
Window It is an object that represents the current browser window object
Window.document.write (); outputting content to the body tag
Window.alert (); is to pop a warning box to the browser's window
Console.log (); is to output the data in the browser's console
Window.prompt (); is a the browser's window pops up a input Box The user enters the data themselves.
The traversal of an array is mainly the use of three structures, especially loops.
Three types of structures:
Order, selection, cycle
Select:if
loops:for,while, do and
For....in statements can also iterate over an array
format:
For ( variable name in array name )
{
}
Array:
Array Definition: 1. var array variable name =[ element 1, element 2 .... element N]
2. var array variable name =new array ();
JS itself is not the concept of multidimensional arrays, because the type of array elements in JS can be any data type.
An array of elements inside it is an array!
How a two-dimensional array accesses an array element
format:
array variable name [Subscript of one-dimensional arrays ] [Subscript of two-dimensional array elements ];
Function:
Function: is the function that you need to implement is written in the content of the function, it can achieve the structure of modularity.
format: function name (parameter name 1, parameter name 2 ...)
{
content
}
calling Function: Function name (parameter name 1, parameter name 2 ...). )
the function name can be written without writing, rather than an anonymous function.
the invocation format of the anonymous function, (function(parameter name){}) (parameter name), the parameter name is not written.
parameters can also be not written, according to the need to determine whether to write.
If a parameter name is written, it participates in the actual argument. The arguments to the calling function are arguments, and the called function is the formal parameter.
JavaScript Basic Learning 2