🌐
Codecademy
codecademy.com › learn › introduction-to-javascript › modules › learn-javascript-loops › cheatsheet
Learn JavaScript: Loops Cheatsheet | Codecademy
... A for loop can iterate “in reverse” by initializing the loop variable to the starting value, testing for when the variable hits the ending value, and decrementing (subtracting from) the loop variable at each iteration.
🌐
Learn JavaScript
learn-js.org › en › Loops
Loops - Learn JavaScript - Free Interactive JavaScript Tutorial
In this exercise, you must write a for loop that iterates on the myArray variable and prints out all of its members. Start Exercise · Previous Tutorial Next Tutorial · Hello, World! Variables and Types · Arrays · Manipulating Arrays · Operators · Conditions · Loops · Objects · Functions · Pop-up Boxes · Callbacks · Arrow Functions · Promises · Async and Await · Object Oriented JavaScript ·
Discussions

For Loop exercise
Hello everyone i wanted to produce a unique message and append that message to the new created array but when i call the function its just create a message for the first Array name here is my code : const writeCard… More on forum.freecodecamp.org
🌐 forum.freecodecamp.org
1
0
August 4, 2022
Beginner Friendly Exercises for practicing JavaScript For and While Loops?
FizzBuzz is a classic: https://leetcode.com/problems/fizz-buzz/description/ More on reddit.com
🌐 r/ADHD_Programmers
7
6
May 10, 2024
html - Exercise with a loop in javascript - Stack Overflow
I need for an university exercise to display onscreen with a document.write the tree below using a kind of loop: I used at the beginning a for loop but i printed only the first row... someone can h... More on stackoverflow.com
🌐 stackoverflow.com
Beginner working through Eloquent Javascript having a challenging time. Any suggestions for me?
I don't know if this will help but there's an annotated version of it by Gordon Zhu, https://docs.google.com/document/d/1aa2-HtUglQrAps31s4LdTPVsiFb1BxhyjZolxeezzcI/ The same person also made a very beginner friendly course called Practical JavaScript http://watchandcode.com/p/practical-javascript which I am taking now. More on reddit.com
🌐 r/learnjavascript
14
16
May 10, 2016
🌐
Exercism
exercism.org › tracks › javascript › concepts › for-loops
For Loops in JavaScript on Exercism
Master For Loops in JavaScript by solving 30 exercises, with support from our world-class team.
🌐
AvanTutor Blog
avantutor.com › home › 10 simple javascript for-loop exercises
10 Simple Javascript For-Loop Exercises - AvanTutor Blog - Tips, Tricks, and Resources for Mastering Coding
February 26, 2023 - Using a for loop print all even numbers up to and including n. Don’t include 0. let n1 = 22; // Example output: // 2 4 6 8 10 12 14 16 18 20 22 OR each item on a new line · Using a for loop output the elements in reverse order
🌐
W3Resource
w3resource.com › javascript-exercises › javascript-conditional-statements-and-loops-exercises.php
JavaScript conditional statements and loops - Exercises, Practice, Solution - w3resource
July 10, 2025 - Write a JavaScript program that iterates integers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for multiples of five print "Buzz". For numbers multiples of both three and five print "FizzBuzz". ... "Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1.
🌐
LaunchCode
education.launchcode.org › intro-to-professional-web-dev › chapters › loops › exercises.html
9.9. Exercises: Loops — Introduction to Professional Web Development in JavaScript documentation
Print the EVEN numbers 12 down to -14 in descending order, one number per line. Print the numbers 50 down to 20 in descending order, but only if the numbers are multiples of 3. Initialize two variables to hold the string 'LaunchCode' and the array [1, 5, 'LC101', 'blue', 42], then construct for ...
🌐
W3Schools
w3schools.com › js › js_loop_for.asp
JavaScript for Loop
JS Examples JS HTML DOM JS HTML Input JS HTML Objects JS HTML Events JS Browser JS Editor JS Exercises JS Quiz JS Website JS Syllabus JS Study Plan JS Interview Prep JS Bootcamp JS Certificate JS Reference ... For Loops can execute a block of code a number of times.
🌐
W3Schools
w3schools.com › js › exercise_js.asp
W3Schools JS Exercise
Exercise 1 Exercise 2 Exercise 3 Exercise 4 Exercise 5 Exercise 6 Exercise 7 Exercise 8 Exercise 9Go to JS HTML DOM Tutorial
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-for-loop
JavaScript For Loop - GeeksforGeeks
It consists of three parts: initialization, condition, and increment/decrement. Syntax · for (statement 1 ; statement 2 ; statement 3){ code here...} Statement 1: It is the initialization of the counter.
Published   September 27, 2025
🌐
Contactmentor
contactmentor.com › js-loop-exercises-solutions
17 JavaScript for/while loop exercises with solutions – Contact Mentor
For loop consisting of setTimeout() function to print loop variable 5 times in asynchronous way.
🌐
Teaching-materials
teaching-materials.org › javascript › exercises › forloops
JavaScript 1: for loops
function assignGrade(score) { if (score > 90) { return 'A'; } else if (score > 80) { return 'B'; } else if (score > 70) { return 'C'; } else if (score > 65) { return 'D'; } else { return 'F'; } } for (var i = 80; i <= 100; i++) { console.log('For ' + i + ', you got a ' + assignGrade(i)); }
🌐
YouTube
youtube.com › watch
Exercises: For Loops - Javascript In Depth - YouTube
Let's go through some exercises to practice with for loops in Javascript. We will see the "continue" and "break" keywords popup here again, as well as condit...
Published   September 30, 2022
🌐
Codecademy
codecademy.com › forum_questions › 5353b2e652f8637c1800130f
Javascript - Practicing Loops! 8. Last practice for loop | Codecademy
The exercise for this session is the following: Write a for loop that gets the computer to count down from 100 until 0 by 5. This time, make sure not...
🌐
Reddit
reddit.com › r/adhd_programmers › beginner friendly exercises for practicing javascript for and while loops?
r/ADHD_Programmers on Reddit: Beginner Friendly Exercises for practicing JavaScript For and While Loops?
May 10, 2024 -

I’ve been on a self-teaching journey for months learning html, css and now JavaScript. By some miracle, I’ve been able to learn the basics of some JavaScript concepts and unfortunately fell into a bit of a ditch with learning for and while loops in JavaScript. It was suggested to me (through a coding community) that I avoid practicing the blend of arrays and loops until I fully understand the basics of loops. So far I’ve been pulling through learning JavaScript through building super small and simplified things but I’ve been struggling to find good exercises online and via chat GPT that practice loops without the integration of arrays.

The only two possible exercises I saw was to

  1. code a loop that counts to a certain number and

  2. code a loop that displays a message beside all even numbers within a loop that has a range of numbers (i.e 1-10)

Does anybody else here learning web development have any valuable resources they can share surrounding loops?

I’m usually more of a visual learner and have a reputation for being horrible at math but I’m very determined to find a way to understand loops that makes sense in my ADHD brain and would appreciate any assistance. :)

🌐
Wikibooks
en.wikibooks.org › wiki › JavaScript › Loops › Exercises
JavaScript/Loops/Exercises - Wikibooks, open books for an open world
September 30, 2022 - "use strict"; // by convention, fundamental constants like PI or such constants that // determine the behavior of your program are written in uppercase const START = 1; const END = 10; let myString = ""; for (let o = END; o >= START; o = o - 2) { myString = 'Next line is: "'; for (let i = 1; i <= o; i = i + 2) { myString += i + ", "; } myString += '"'; alert(myString); } 3. Write a script that creates a 'quadrat' with edge length 4. It consists of 'x's at one diagonal and dots at the other places. Hint: Create an empty string and - within the loop - append characters to the string.
🌐
GitHub
github.com › omaracrystal › javascript-loop-exercises
GitHub - omaracrystal/javascript-loop-exercises
Solve each of the given problems, writing a loop the outputs the given output to the JavaScript console. ... The output of the problems is written on a single line for brevity; your solutions will output each value on a new line like in the ...
Author   omaracrystal
🌐
Programiz
programiz.com › javascript › for-loop
JavaScript for loop (with Examples)
In this example, we used the for loop to print "Hello, world!" three times to the console. ... Once an iteration of the loop is completed, the condition is evaluated again. The process continues until the condition is false. To learn more about the condition, visit JavaScript Comparison and ...
🌐
Educative
educative.io › blog › javascript-loops-tutorial
JavaScript loops tutorial: for loop, while loop, and more
May 19, 2025 - Learn how to master JavaScript loops—from for and while to forEach() and for...of. This guide covers syntax, use cases, and tips to write efficient, scalable code.