Js the front to get started --JavaScript statement

No matter how large the organization is progressively extended from the bottom of a small unit composed.

Such as the army, the first is a single soldier, and soldiers a class, and then make up a platoon, or even progressively extended to an army.

Programming language, so, too, a good large code base, there is also the smallest unit of program progressively extended composition.

JavaScript statement:

JavaScript is an expression of the phrase, the statement is a sentence or JavaScript command.

Sentence end with a semicolon (semicolon sometimes can be omitted, it is necessary to maintain the semantic integrity).

If the expression is the body's soft tissue or cell, then the statement is a higher level of organ, can perform complex operations, change the operating status of the program.

Complex statements can also be nested simple statement, see the following code example:

function func(){
  // code
}

The above statement is a function declaration, it may function more powerful, able to do a lot of things.

Expression statement:

Some code can only be seen as an expression, can also be seen as statements, we can be called an expression statement.

var num;
num = 1 + 2;

num = 1 + 2 may be calculated from a value (characteristic expression), also completed assignment (function statement).

In fact, based on these concepts, often we do not need to get to the bottom, even if the need to truly master it, and sometimes there is no need to hurry. You must have such an experience, before some concepts are difficult to understand, but in the subsequent development, with the growth of work experience and knowledge of reserves, will naturally understand the true meaning of these concepts.

Finally, I recommend a push in the front-end learning exchange group 685 910 553 Advanced ( front-end information-sharing ), no matter which direction you are on Earth,
whether you are welcome to work in a few years you settled in! (Within the group regularly offer free collection of some of the main group of free learning materials and books tidied face questions and answers document!)

If you have any objection to this article, then please write your comments in the article comments at.

If you find this article interesting, please share and forward, or you can look at, you acknowledge and encouragement of our articles.

Wish everyone in the programming this road, farther and farther.

Guess you like

Origin blog.csdn.net/tianduantoutiao/article/details/90813896