Python DAY14 JavaScript

Source: Internet
Author: User

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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.