bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Learn/JavaScript/Debugging, Projects, and Reference
JavaScript•Debugging, Projects, and Reference

JavaScript Statements

Statement Identifiers

JavaScript statements start with a statement identifier to identify the action to be performed.

Statement identifiers are reserved words (cannot be used as variable names or any other things).

Revised July 2025

StatementDescription
{ }Creates an block of statements
async functionCreates an AsyncFunction object
async function*Creates an AsyncGeneratorFunction object
await usingDeclares local variables that are asynchronously disposed
breakExits a switch or a loop
classDeclares a class
constDeclares a variable with a constant value
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
forLoops through a block of code a number of times
for...inLoops through the properties of an object
for...ofLoops through the values of an iterable object
for await...ofLoops over async iterable objects
functionDeclares a function
function*Creates a GeneratorFunction object
if...else...else ifMarks a block of statements to be executed depending on a condition
importDefines a read-only import of a module
import attributesDefines how a module should be loaded
letDeclares a variable
returnStops the execution of a function (and returns a value)
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
usingDeclares local variables that are synchronously disposed
varDeclares a variable
whileMarks a block of statements to be executed while a condition is true

See Also

Tutorial: JavaScript Statements

Previous

JavaScript Debugging

Next

Project - localStorage Counter

This chapter

Overview
32

Lessons

180m

Read time

1. JavaScript Errors2. JavaScript Debugging3. JavaScript Statements4. Project - localStorage Counter5. ECMAScript 20266. JavaScript Silent Errors7. JavaScript Debugging Console8. JavaScript Reserved Words9. Project - Event Listener10. ECMAScript 202511. JavaScript Error Statements12. JavaScript Debugging Breakpoints13. JavaScript Operator Precedence14. Project - To-Do List15. ECMAScript 202416. JavaScript Debugging Errors17. Project - Modal Popup18. ECMAScript 202319. JavaScript Debugging Async20. Project - Form Validation21. ECMAScript 202222. ECMAScript 202123. ECMAScript 202024. ECMAScript 201925. ECMAScript 201826. ECMAScript 201727. ECMAScript 201628. Javascript 2015 (ES6)29. JavaScript 2009 (ES5)30. JavaScript 1999 (ES3)31. JavaScript Versions32. JavaScript History

On this page

Statement IdentifiersRevised July 2025