"JavaScript" 02. Basic Grammar Learning

Source: Internet
Author: User

"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

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.