Section 101th, JavaScript Process Control statements

Source: Internet
Author: User

JavaScript Process Control Statements

Learning Essentials:

1. Definition of statements

2.if statements

3.switch statements

4.do...while statements

5.while statements

6.for statements

7.for...in statements

8.break and Continue statements

9.with statements

ECMA-262 sets up a set of process control statements. A statement defines the primary syntax in ECMAScript, which typically consists of one or more keywords to accomplish a given task. such as: Judgment, circulation, exit, etc.

A. definition of a statement

In ECMAScript, all the code is composed of statements. Statements indicate the process, qualification, and convention in the execution, which can be either a single line statement or a compound statement enclosed by a pair of curly braces "{}", in which the composite statement can be treated as a single-line statement in the syntax description.

Types of statements

Type

Sub-type

Grammar

Statement statement

Variable declaration statements

var box = 100;

Label declaration statement

An expression statement

Variable assignment statements

box = 100;

Function Call statement

Box ();

Property Assignment Statements

Box.property = 100;

Method Invocation Statement

Box.method ();

Branch statements

Conditional branching statements

if () {} else {}

Multiple branching statements

Switch () {Case n: ...};

1

Section 101th, JavaScript Process Control statements

Related Article

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.