Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the commonly used sentences in javascript

Shulou Source: shulou.com Published: 2022-05-31 11:52:12 09月15日 Update

In this article, the editor introduces in detail "what are the commonly used sentences in javascript", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what are the commonly used sentences in javascript" can help you solve your doubts.

Javascript statements are: 1, break statement, used to jump out of the loop; 2, catch statement, execute try statement block when there is an error in execution of catch statement block; 3, continue statement, used to skip an iteration in the loop; 4, for statement, execute code block a specified number of times, and so on.

This article operating environment: windows7 system, javascript1.8.5 version, DELL G3 computer

What are the javascript statements?

JavaScript statement identifier

A JavaScript statement usually starts with a statement identifier and executes the statement.

Statement identifiers are reserved keywords that cannot be used as variable names.

The JavaScript statement identifier (keyword) is listed below:

JavaScript statement

Break: used to jump out of the loop.

Catch: a statement block that executes a try statement block when there is an error in the execution of the catch statement block.

Continue: skip one iteration in the loop.

Do... While: executes a block of statements that continues when the conditional statement is true.

For: when the conditional statement is true, you can execute the block of code a specified number of times.

For... In: used to iterate through the properties of an array or object (loop through the properties of an array or object).

Function: define a function

If... Else: used to perform different actions based on different conditions.

Return: exit function

Switch: used to perform different actions based on different conditions.

Throw: throws (generates) an error.

Try: implements error handling and is used with catch.

Var: declare a variable.

While: executes the statement block when the conditional statement is true.

After reading this, the article "what are the commonly used sentences in javascript" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.

Tags: Statements conditions loops differences identifiers identifiers frequently used articles codes keywords contents functions actions variables objects attributes arrays times errors Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Apple Shulou Technology NVidia Linux