MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Statements › for
for - JavaScript | MDN - MDN Web Docs - Mozilla
The for statement creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement (usually a block statement) to be executed in the loop.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Statements › for...in
for...in - JavaScript | MDN - MDN Web Docs
This feature is well established ... since July 2015. ... The for...in statement iterates over all enumerable string properties of an object (ignoring properties keyed by symbols), including inherited enumerable properties....
Videos
06:02
What is the For...in Loop in JavaScript Tutorial -Part 13 - YouTube
11:15
JavaScript Loops Explained (for, for... of, for... in, forEach ...
30:27
Loops In JavaScript With Examples | ES6 | for, for of, for in, ...
04:20
#21 For in loop in JavaScript - YouTube
07:03
For in and for of loop in javascript - YouTube
04:32
for in / for of - Beau teaches JavaScript - YouTube
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Statements › for...of
for...of - JavaScript | MDN - MDN Web Docs
The for...of statement executes a loop that operates on a sequence of values sourced from an iterable object. Iterable objects include instances of built-ins such as Array, String, TypedArray, Map, Set, NodeList (and other DOM collections), as well as the arguments object, generators produced ...
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript
JavaScript - MDN Web Docs - Mozilla
JavaScript (JS) is a lightweight interpreted (or just-in-time compiled) programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat.
GeeksforGeeks
geeksforgeeks.org › javascript › for-in-loop-in-javascript
JavaScript For In Loop - GeeksforGeeks
The for...in loop in JavaScript is used to iterate over the enumerable properties of an object.
Published January 22, 2026
W3Schools
w3schools.com › js › js_loop_forin.asp
JavaScript For In
The for...in loop is primarily used for objects to access their property names (keys). for (key in object) { // code block to be executed } key A variable that holds the name (key) of each property during the iterations · object The object ...
W3Schools
w3schools.com › jsref › jsref_forin.asp
JavaScript for/in Statement
Do not use for...in to iterate an array if the index order is important. Use a for loop instead. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report an error, or if you want to make a suggestion, send us an e-mail: help@w3schools.com · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial
Programiz
programiz.com › javascript › for-in
JavaScript for...in loop (with Examples)
The JavaScript for...in loop iterates over the keys of an object. In this tutorial, you will learn about the JavaScript for...in loop with the help of examples.
W3Schools
w3schools.com › js › js_loop_for.asp
JavaScript for Loop
When let is used to declare the i variable in a loop, the i variable will only be visible within the loop. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report an error, or if you want to make a suggestion, send us an e-mail: help@w3schools.com · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Scripting › What_is_JavaScript
What is JavaScript? - Learn web development | MDN
January 12, 2026 - JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, ...
Mimo
mimo.org › glossary › javascript › for-loops
JavaScript For Loop: Efficient Iteration in JavaScript
The two most distinct are the classic for loop and the for...in loop. ... Become a full-stack developer. Learn HTML, CSS, JavaScript, and React as well as NodeJS, Express, and SQL ... Master the language of the web. Learn variables, functions, objects, and modern ES6+ features ... Classic for loop: Repeats a block of code a specific number of times. It is commonly used to iterate over an array using its index.
W3Schools
w3schools.com › js › js_loop_forof.asp
JavaScript For Of
The JavaScript for of statement loops through the values of an iterable object. It lets you loop over iterable data structures such as Arrays, Strings, Maps, NodeLists, and more: for (variable of iterable) { // code block to be executed } variable ...
BrainStation®
brainstation.io › learn › javascript › what-is-javascript-used-for
What Is JavaScript Used For? (2026 Tutorial & Examples) | BrainStation®
February 4, 2025 - Where the HTML and CSS programming languages are used to give websites their structure and style, JavaScript is used to take static web applications and brings them to life, greatly improving the user experience in the process. Given how popular and ubiquitous JavaScript has become, it sometimes seems like the answer to the question “What is JavaScript used for?” is “everything.”
Udacity
udacity.com › topic › what-is-javascript-used-for
What Is JavaScript Used For? | Courses, Use Cases & Examples
JavaScript (JS) is a high-level, versatile programming language that adds interactivity and dynamic behavior to websites. It works alongside HTML, which structures content, and CSS, which styles it, forming the three core web technologies.
GeeksforGeeks
geeksforgeeks.org › javascript › explain-the-differences-between-for-in-and-for-of-statement-in-javascript
Differences Between for-in and for-of Statement in JavaScript - GeeksforGeeks
July 12, 2025 - Although it can also be used to iterate over the indices of an array. Conversely, the for..of loop is intended to iterate directly over values in iterable collections like arrays, strings, Maps, or Sets. The JavaScript for-in loops through the enumerable properties of an object.