The problem that occurs yesterday when you use a For loop to go to the weight of an array,
First, the previous and all subsequent elements are compared with the double for loop, and if equal is deleted.
However, problems can occur if there are
Objective
This article is my Learning JavaScript process of collection and collation of some error-prone knowledge points, this paper introduces and explains the 6 aspects of variable scope, type comparison, this point, function parameter, closure
SetTimeout ()
The setTimeout definition of MDN is:
Calls a function or executes a code fragment after the specified delay time.
Grammar
The syntax for settimeout is very simple, the first parameter is a callback function, and the second
In JavaScript, creating an array can use the new array, and the following syntax is correct:
Arrayobj = new Array () creates an array.
Arrayobj = new Array ([size]) creates an array and specifies the length, not the upper limit, but the
In my opinion, the warning box is only used when the browser does not support other ways to display error messages. The Consortium recommends that we display an error message near the form item. This is a good idea, so we only use the warning dialog
One of the advantages of JavaScript is how it handles asynchronous code. The asynchronous code is put into an event queue until all other code is executed, without blocking the thread. However, it may be difficult for beginners to write asynchronous
This method returns a string representing the specified Date object.Grammar
Date.tostring ()
The following are the details of the parameters:
NA
return value:
Returns a string representing the specified Date objectExample:
This method performs a search for a regular expression and a match between string objects.Grammar
String.search (RegExp);
The following are the details of the parameters:
RegExp: Regular Expression object. If the RegExp object obj is
literal constant without quotes Nan is a special value that represents not a non-numeric number. Because Nan is always in a relatively unequal situation, in any number, including Nan, it is usually an error condition for a function that indicates
First, the preface
In the past, JavaScript was used to do simple web effects, such as form validation, floating ads, and so on, so JavaScript didn't get much attention at the time. Since the start of Ajax, people have found that using JavaScript
The JavaScript Date.gettimezoneoffset () method returns the time zone's offset from the current region in minutes. The time zone offset is minute, and Greenwich Mean Time (GMT) is relative to your local time.
For example, if the time zone is gmt+10,
From:http://www.nirvanastudio.org/javascript/improve-javascript-performance.html
Author: shiningray @ Nirvana Studio
With the development of the network and the speed of the machine, more and more websites use the rich client technology. Now Ajax
Introduced
This article mainly introduces the function aspect uses some techniques (above), uses the function characteristic to be possible to write many very interesting code, this article mainly includes: The callback pattern, the configuration
The definition of a diagram
Graph is composed of a set of vertices with a poor non-empty set and an edge between vertices, usually expressed as: g (v,e), where G represents a graph, V is a set of vertices in graph G, and E is a set of edges in
1, what is JavaScript?(1) HTML is just a markup language that describes the appearance of a Web page, there is no calculation, judging ability, if all calculations, judgments (such as the decision to determine whether the text box is empty, to
In general, functions can be in javascript:
is assigned to a variable
Attributes assigned as objects
is passed as a parameter to another function
As the result of the function is returned
Create in literal quantities
Function Object
1.1
Five iterative methods accept two parameters: the function to run on each item and the scope to run the function (optional)
Every (): Runs the given function for each item in the array. Returns True if the function returns true for each item.Filter
First, classification
Basic data type: Undefined, null, string, Boolean, number
Complex data type: Object
The properties of object are defined in the form of unordered names and value pairs (name:value)
Second, detailed
1. Undefined: Undefined
The constructors in Javascript are different than other languages. Any function called by the keyword new can be used as a constructor.In the constructor body, this points to the newly created object. If a return expression is not displayed in the
callback function definition
A callback function is a function called by a function pointer. If you pass the pointer (address) of a function to another function as an argument, when the pointer is used to call the function it points to, we say this
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