This article introduces the content of the second chapter of the seed module of the javascript framework design of situ Zhengmei. it is a small post-reading experience. you can refer to it. The seed module is also called the core module, which is
null: Is an object, but a null reference (not pointing to any object)Empty Object : is an object, but its value is a reference to an object that does not have any propertiesundefined: Undefined, so not an object, which itself is defined as a special
Four. Operators Operators include arithmetic, bitwise operator relationship operators, and equality operators. The bitwise operator does not look at the moment. 1. Arithmetic operationsSubtraction arithmetic. It's the same as the math book.% modulo:
I. multiple choice questions
1. Which of the following statements will generate a running error? ()
A. var OBJ = ();
B. var OBJ = [];
C. var OBJ = {};
D. var OBJ = //;
Comments: OBJ = [] defines an array object, OBJ = {} defines an object
Javascript advancedProgramDesign
The
2
Chapter
Ecmascript
Basic
1
,
Original
Variable type
Is a pseudo object with attributes
(
For example
Length)
And Methods
(
For example
Null
Is a javascript keyword
Is an object type, but is often divided into a separate type
No value
Undefined
It also indicates that there is no value, but it is a deeper level, or a system level.
It is not a type, it is a pre-
Line 78 of jquery. UI. Slider. js
If (O. range = "min" | O. range = "Max "){This. range. addclass ("UI-slider-range-" + O. Range );}
"=" Is a fully-identical operator. The all-identical operator follows the comparison rules of equal operators.
Type conversions in JavaScript can be classified as implicit type conversions and explicit type conversions. The dominant transformation is to change the data type directly in the code by means of the method. The common methods are
type conversion of data:As mentioned before, the data types in JS are divided into two kinds,Basic data Type string number Boolean undefined nullComplex data type Object Date Array functionAnd in the actual programming, often with to the data type
Chapter One JavaScript overview 1 JS is a high-end, dynamic, weakly typed programming language that is ideal for object-oriented and functional programming styles. Chapter two lexical structure 1 JS program is written in Unicode character set. 2 JS
Data typeJS has a total of six data types, including five basic data types, number, String, Boolean, Null, Undefined, and a complex data type--object type.typeofThe typeof operator detects the data type of a given variable, and returns a function,
First, the grammar1. Case-sensitiveEverything in ECMAScript (variables, function names, and operators) is case-sensitive.2. IdentifiersThe so-called identifier refers to the name of a variable, function, property, or parameter of a
1. JavaScript data types
Number
String
Boolean
Undefined
Null
Object
For example, whereNumber、String、Boolean、Undefined、NullIs the original type,ObjectIs the object type,ObjectCan containArray、Functionand other types.
1, [0,nan, "", null,undefined] can be converted directly to false, but these values are not exactly equal1 vararr = [0, "",false,NULL, Undefined,nan]2 for(vari=0;i){3 for(varj=i;j){4 if(arr[i]==Arr[j]) {5Console.log
In JavaScript development, I was asked: What is the difference between null and undefined? It is hard to answer at a time, especially undefined, because it involves the implementation principle of undefined.
Total offices: null = undefined
But:
There are 5 basic data types in ECMAScript: Undefined, Null, Bollean, number, and string,1 complex data types: Object.Because ECMAScript is loosely typed, it provides an operator-typeof that detects the data type of a given variable. Using this
There are 5 simple data types in ECMAscript, also known as basic data types: Undefined, Null, Boolean, number, and string. There is also a complex data type of--object.Undefined typeWhen you declare a variable with VAR but do not initialize it, the
JS implementation:1, the composition of JavaScript implementation:Core (ECMASCRIPT): defined by ECMA-262, providing core language functionalityThe Document Object Model (DOM) provides methods and interfaces for accessing and manipulating Web page
One of the frequently asked questions in front-end interviews is "What are the basic types of JavaScript ?".
Some answer "numbers, strings, and Boolean", and some may add "Null, Undefined ". Some people may think that "object" is also the basic type.
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.