JavaScript is a programming language, and this is the first point of view. is a programming language, it has the function of a programming language. In my understanding, the programming language is the language that deals with computer, is the language that we speak with the computer, is used to command the computer. Humans are able to understand language by receiving verbal information through their ears or eyes, and then through the brain to understand and react. Accepting the first tentacles of the JavaScript language, for a computer, is the browser, the JavaScript language written by the browser to translate the execution. This is the first point of view, language, is used to communicate, and needs to be received after the understanding.
In essence, computers are used to compute and manipulate data, and data can be images, sounds, numbers, text, and so on. Humans use programming languages primarily to tell computers how to process data. This is the second point of view, where the computer processes data, and the programming language directs the computer to handle the data.
So JavaScript is used to deal with what kind of data. HTML pages, browser data, plus some control statements, syntax, and logic for the language itself. So, JavaScript mainly contains three parts, ECMAScript syntax, Dom object, BOM object.
ECMAScript Grammar, is the language itself, some definitions, conventions. Includes data types, Process Control statements (if, else, for ...). ), functions, and so on, something common in programming languages.
Dom object, is an HTML object, you can understand the HTML document object as a tree structure, you can use object-oriented way, to get the DOM object is equivalent to get the entire HTML page, you can manipulate all its nodes.
The BOM object, which is the browser object, the Window object. As you can see, the browser puts its own attributes in the BOM object. This includes the browser's cookie,history,location and so on, which corresponds to the operation of the browser itself.
To be blunt, JavaScript is about manipulating HTML pages in the browser. What it solves is the data processing on the page, as well as the changes in the information, the form that he can make the page move. This is my first impression of JavaScript, and the following blog post will delve into the language of JavaScript again.
Ah, Kim. Learn JavaScript Overall impression of JavaScript series one