"JavaScript" 02. Basic Grammar Learning
Introduction:
The Old Farmer thinks (the old farmer is my nickname to oneself), learns any computer programming language to begin with its grammar knowledge first. A computer program language consists of a set of predefined characters and the rules that write these characters. These predefined characters are called keywords or reserved words in the language, and the rules for writing these characters are called grammars.
Computer language (computer lnguage) refers to the language used for communication between people and computers. Language is divided into two categories: natural language and artificial language. Natural language is the language that human beings form in the process of their own development, which is the medium of transmitting information between people. Artificial language refers to the language that people have designed themselves for a certain purpose. Computer language is a language of artificial languages. Computer language is the medium of transmitting information between man and computer. The greatest feature of a computer system is that it communicates to the machine through a language. In order for the computer to do all kinds of work, there is a set of numbers, characters, and grammar plans that are used to program the computers, and these characters and grammatical rules make up the various instructions (or statements) of the computer. These are the languages that computers can accept.
We have just explained the concept of computer programming language. Next, let's look at a simple JS code. This leads to the next concept: data .
<type= "Text/javascript"> alert (1+ 2); </ Script >
What does this JS code mean to let the computer tell us what the result of 1+2 is? The "+" symbol is the same in this expression and in the meaning of the plus sign we normally call it. 1 and 2 are the old farmer input data, can be fully expressed as data number 1, data number 2. The data we can write in JS is divided into: numeric, character, Boolean,
<type= "Text/javascript"> alert ('1+ 2 '); </ Script >
Looking at this code again, the expression 1+2 enclosed in quotation marks. At this point, JS treats it as a character.
"JavaScript" 02. Basic Grammar Learning