Native JS Learning Note 3--Array Defining arraysThere are two ways of defining an array:1. var array1 = new Array (1, 2, 3, 4);2. var array2 = [1, 2, 3, 4]; Insertion and deletion of array elements ? Push (Element): Add a new element from the
Bubble sortSelect sortInsert SortFor a long time not clear of the sort today, including bubble sort, choose sort, insert sort, finish this again look and quick sort of difference. It feels like the school is back to the teacher.----bubbling/*
1. Basic features of Module mode A) Modular REUSABLEB) encapsulates the variable and function and the global namespace without contact loose coupling.C) expose only available public methods other private methods are all hidden 2. Anonymous closures
1, base type: String type (String), numeric type (number), Boolean type (Boolean)2, complex types: array types (arrays), object types (objects), function types (functions), regular types (regexp)3, empty type: Undefine and nullString to number Type
Scopes, as a basic function, exist in a variety of programming languages, making our programming more flexible and interesting. The underlying function is to store the values in the variables and then access and modify the values.Maybe we all know
To encapsulate a post submission:function Post (URL, PARAMS) { = document.createelement ("form"); = URL; = "POST"; = "None"; for (var x in PARAMS) { = document.createelement
1, Process Control statements) If statementif (condition) {Statement1}else{Statement2}Condition represents an arbitrary expression, the result of which the expression evaluates is not necessarily a Boolean type, and if it is not a Boolean type,
First, Function+namefunction Fun1 (A, b) {return a+b;}1. function does not return a value type2. The parameter list does not require a type, equivalent to the function's entry3.return can not have statements, or do not execute, equivalent to the
Code section:${goodsClassify.tname}Page Display effect: ebook Question: When you click the a tag, the parameter is not 16091910002532265, but 16091910002532264.Workaround: Add "inside the source code"${goodsClassify.tname}The data indicates that
628 pages, a few days, slowly from the beginning to look over, also over and over, some concepts have always known, but the program of the world is so, all things are those, but is like to see this easy-to-understand book, is like to see what they
See code Example 1 varA=1; functionM (a) {//here is the parameter of the first incoming function of the formal parameter, both arguments[0]alert (a);//where a is bound to a formal parameter} m (a);//1 A In this case passes the variable a as a
1.toString () and string ()Mode of Use: x.tostring ();-----String (x);String is a versatile method, and x.tostring () has limitations, and cannot convert undefined and null into a string. Because the two can't be used.". Method"Forms of use.We can
Closures (closure) are a very important threshold for mastering JavaScript from the human door to the deep, which is a difficult and characteristic of the JavaScript language, and many advanced applications rely on closures. Below, write down my
This is flexible in JavaScript, which may be different depending on the environment, or if the same function is called under different methods. But there is a general principle, that is, this refers to the object that called the function. Here are
Reprinted from: http://www.cnblogs.com/baochuan/archive/2012/04/30/2473771.htmlMind MappingIntroduction is always writing JS, how do you usually write your JS it? Which way do you prefer? Today, it's common to nag at everyone. --old, on this hobby
Learning to create a foldable tree menu with pure CSS, and creating a foldable tree with css
With the release of CSS3, foreign research is in full swing, but in China there are still many people holding the idea that IE does not support CSS3, always
Native JS---3, native js
Native js study Note 3 -- Array
Define an array
You can define an array in either of the following ways:
1. var array1 = new array (1, 2, 3, 4 );
2. var array2 = [1, 2, 3, 4];
Insert/delete array elements
•Push: add
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service