Note source: Still silicon Valley latest version of the full set of JavaScript basic tutorial complete version (140 sets of actual combat teaching,JS from entry to master)_ bilibili _bilibili

[TOC]

JS profile

1. What is language

A computer is a machine controlled by a human. It does what it is told to do.

The language we want to learn is a tool for people and computers to communicate, and humans control and operate computers through language.

Programming languages are essentially the same as Chinese and English, except for their special syntax.

Language development:

  • Tape machine: Machine language
  • Assembly language: symbolic language
  • Modern languages: high-level languages

2. Origin of JS

JavaScript was born in 1995 and was primarily used to handle front-end validation in web pages.

The so-called front-end verification is to check whether the user’s input conforms to certain rules.

For example, the length of the user name, password, and email format.

3. A brief history of JS

  • JavaScript was invented by Netscape, originally named LiveScript, but later changed to JavaScript when SUN intervened.
  • In 1996, Microsoft introduced its own implementation of JavaScript, JScript, in its latest Internet Explorer 3 browser.
  • So there are two versions of JavaScript on the market, a Netscape JavaScript and A Microsoft JScript.
  • To ensure that JavaScript standards run consistently across browsers, several companies have come together to create a standard name for JS called ECMAScript.

schedule

year The event
In 1995, Netscape developed itJavaScript
In 1996, Microsoft has released a JavaScript compatible versionJScript
In 1997, ECMAScriptEdition 1 (ECMA-262)
In 1998, ECMAScript version 2
In 1998, DOM Level1 formulation
In 1998, The new languageDHTMLCome on stage
In 1999, ECMAScript version 3
In 2000, DOM Level2 formulation
In 2002, Establishment of ISO/IEC 16262:2002
In 2004, DOM Level3 formulation
In 2005, The new languageAJAXCome on stage
In 2009, ECMAScript version 5
In 2009, The new languageHTML5Come on stage

4, implementation,

ECMAScript is a standard that needs to be implemented by vendors.

Different browser vendors have different implementations of this standard.

The browser JavaScript implementation
FireFox SpiderMonkey
Internet Explorer JScript/Chakra
Safari JavaScriptCore
Chrome v8
Carakan Carakan

We already know that ECMAScript is a JavaScript standard. So normally, we think of these two words as having the same meaning.

But JavaScript actually means a lot more than that.

A complete JavaScript implementation should consist of three parts:

5. Learning content

We already know that a complete JavaScript implementation consists of three parts: ECMAScript, DOM, and BOM.

So we know that what we’re going to learn is these three parts.

  • ECMAScript
  • DOM
  • BOM

6, THE characteristics of JS

  • Interpretive language
  • Syntax structure similar to C and Java
  • Dynamic languages
  • Object oriented based on prototype

7, the HelloWorld

Control browser pops up an alert box

alert("Hello World!");
Copy the code

Tell the computer to output a content on the page

document.write("Hello World!");
Copy the code

Output a content to the console

console.log("Hello World!");
Copy the code