Wednesday, 1 May, 2024 UTC


Summary

JavaScript statements control the overall flow of JavaScript programs. Statements are used to declare variables and manage iterative processes, and they can also be used to declare classes and functions.
Unlike properties, methods, and events, which are inseparable from the object that owns them, statements work independently. That means you can use a statement in any context, whether you're programming a client-side or server-side application. As a language, JavaScript supports relatively few statements—just enough to construct functional applications.

About the authors

An earlier version of this article was written by Gordon McComb and published on JavaWorld. Matthew Tyson updated the article with newer syntax and code examples in May 2024.
To read this article in full, please click here