Our Recommendation for You Search your Query, You can find easily. for example search by book name or course name or any other which is related to your education

label name

PHP

JS Statement

JavaScript Statements ReferenceJAVASCRIPT


JavaScript StatementsJAVASCRIPT

In HTML, JavaScript statements are "instructions" to be "executed" by the web browser.
This statement tells the browser to write "Hello Dolly." inside an HTML element with id="demo":

Example

document.getElementById("demo").innerHTML = "Hello Dolly.";
For a tutorial about Statements, read our JavaScript Statements Tutorial.

JavaScript Statement IdentifiersJAVASCRIPT

JavaScript statements often start with a statement identifier to identify the JavaScript action to be performed.
Statement identifiers are reserved words and cannot be used as variable names (or any other things).
The following table lists all JavaScript statements:
Statement Description
breakExits a switch or a loop
continueBreaks one iteration (in the loop) if a specified condition occurs, and continues with the next iteration in the loop
debuggerStops the execution of JavaScript, and calls (if available) the debugging function
do ... whileExecutes a block of statements and repeats the block while a condition is true
forMarks a block of statements to be executed as long as a condition is true
for ... in Marks a block of statements to be executed for each element of an object (or array)
functionDeclares a function
if ... else ... else ifMarks a block of statements to be executed depending on a condition
returnStops the execution of a function and returns a value from that function
switchMarks a block of statements to be executed depending on different cases
throwThrows (generates) an error
try ... catch ... finallyMarks the block of statements to be executed when an error occurs in a try block, and implements error handling
varDeclares a variable
whileMarks a block of statements to be executed while a condition is true