Since we know that global variables are the attributes of global objects, and local variables are the attributes of a special called object, we can focus on the representation of variable scopes again, redefine it. The new description of scopes
ProgramThe lexical structure of the design language is a set of basic rules used to describe how to use this language to write programs. It is the lowest-level syntax of a language, specifying the variable name, the description of what characters
Use JavaScript to pass Chinese parameters on two JSP pages, and use. Location. href = "result. jsp? CountryID = "+ escape (countryname) +" & areaid = "+ escape (areaid); this method is not successful. It seems that it is indeed difficult to pass
Chapter 5 inheritance
5.1. Two Roles of inheritance: 1,CodeReuse; 2. type system specifications.5.2. Javascript is a weak language. Type conversion is not required. The origin of an object is irrelevant.5.3 Javascript is a prototype-based language,
Chapter 2CodeStyle
9.1. Why do we need to follow strict coding standards?1) JavaScript is a weak type language with over-fault tolerance.2) ExcellentProgramWith a forward-looking structure, it will meet the possible changes required in the future,
Chapter 2 syntax2.1. jslint is a javascript parser that can analyze JavaScript problems and report their shortcomings. It can convince you of yourProgramContains only the essence.2.2 useless comments are worse than no comments.2.3 because some
② Directly count characters:
As mentioned in the previous article, all the letters and numbers in the regular expression are directly matched with their own numbers. The regular expression syntax of JavaScript also supports certain non-letter
Renewal flag
The regular expression syntax also has the last element, that is,FlagDescribes the rules for advanced mode matching. Unlike other regular expression syntaxes, the signs are described outside the "/" symbol, that is, they do not appear
④ Repetition
With the regular expression syntax you have just learned, you can describe two digits as/\ D/and four digits as/\ D /. However, there is no way to describe any number or description string that consists of three letters and one digit
The most important feature of functions is that they can be defined and called. Function Definition and calling are the syntax features of most programming languages. However, in Javascript, a function is not just a syntax, but also data. This means
MethodIt is only a JavaScript function that is stored in an object property and called through the object.
function as a method
That is to say, if there is a function f and an object o, you can use the following code to define a method named M:
JavascriptSupported5 Basic Data Types:
Number
Numeric type
String
String
Boolean
True/false
Null
Null
Undefined
Undefined
In addition to these basic data types, JavaScript also
Chapter 3 objects
3.1 simple JavaScript types include numbers, strings, Boolean values (true and false), null values, and undefined values. All other values are objects.3.2. Objects in JavaScript are variable key sets. In JavaScript, arrays are
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