OneECMAScript
Although ECMAScript is an important standard, it is not the only part of JavaScript, and certainly not the only one that is standardized. In fact, a complete JavaScript implementation is made up of the following 3 different parts:
- Core (ECMAScript)
- Document Object Model (DOM) Documents object models (consolidated js,css,html)
- Browser object models (BOM) Broswer object Model (integrated JS and browser)
- The vast majority of Javascript in development is object-based. It is also object-oriented.
To put it simply, ECMAScript describes the following:
- Grammar
- Type
- Statement
- Key words
- Reserved words
- Operator
- Object (encapsulates inherited polymorphism) object-based language. Use an object.
Ii. Basics of JavaScript 1. Access mode
1.html head with script tag <script> alert (' Hello Yuan ') </script>2 import file <script src= " Hello.js "></script>
2.js Variable Constants
(1). Declare a variable without declaring the variable type. All use the var keyword;
var A;
(2). a row can declare multiple variables. And can be of different types
var name= "Yuan", age=20, job= "lecturer";
(3). you can declare variables without var. if you don't use Var then it's a global variable
(4). variable name, the first character can only be letter, underscore, $ dollar symbol three select one, the remaining characters can be underscores, dollar signs or any alphanumeric characters and case-sensitive, x and X is two variables
3. Constants and identifiers
(1). Consists of letters, numbers, underscores (_), Dollar signs ($) that do not begin with a number
(2). Names commonly used to denote functions, variables, etc.
(3). For example: _ABC, $ABC, abc,abc123 is an identifier, and 1ABC is not
(4). Words that represent a particular meaning in the JavaScript language are called reserved words and do not allow programs to be redefined as identifiers
4.js Data types
Python DAY14 JavaScript