No video

#25 How to use the JS For Loop | JavaScript Full Tutorial

  Рет қаралды 10,746

Dev Dreamer

Dev Dreamer

Күн бұрын

🙂 SUBSCRIBE - hit the bell 🔔 and choose all: goo.gl/nYLZvz
In this lesson let's learn all JS Loops by starting with the for loop. The for loop is the most common type of loop in JavaScript. Let's learn how to use a for loop to loop through a list of values and do something with them, for e.g. using the values with some custom text.
By the end of this lesson you will be comfortable and able to start using for loops in your projects.
------------------
👍 HTML FULL TUTORIAL: shorturl.at/fiCMV
👍 CSS FULL TUTORIAL: shorturl.at/clGSZ
------------------
FACEBOOK: / devdreamercode
TWITTER: / devdreamercode
SUBSCRIBE and hit the BELL NOTIFICATION 🔔: goo.gl/nYLZvz
------------------
Learn with Dev Dreamer! Step by step, easy to understand tutorials :-)

Пікірлер: 23
@AdityaYadav-eq5wu
@AdityaYadav-eq5wu 2 жыл бұрын
Bro, You are doing a great job, and I appreciate your efforts. I specifically search your channel for tutorials so, don't stop you will be great youtuber
@Herson_ricardo_alarcon
@Herson_ricardo_alarcon 8 ай бұрын
Best explanation I’ve seen so far!! Thanks so much. I still want to understand more about the initialiser but is becoming more clear.
@alisachavez1025
@alisachavez1025 Жыл бұрын
Absolutely loving this course. You explain everything so well! this is one of the best explanations out there
@alive6293
@alive6293 16 күн бұрын
Thank you for making it so simple...
@user-cm4pz2om7e
@user-cm4pz2om7e 2 жыл бұрын
your chancel is god send! thanks for everything u do. I'm following colt's JS course and loop was confusing the hell out out of me but u explained it way much better in my opinion.
@DevDreamer
@DevDreamer 2 жыл бұрын
Thank you so much! Appreciate the love and support! 🙂👍
@windowsuser2162
@windowsuser2162 26 күн бұрын
You are amazing
@kaijyuu_ka-ju48
@kaijyuu_ka-ju48 7 ай бұрын
Very helpful, thank you
@cauenathanmiguelcastro2463
@cauenathanmiguelcastro2463 3 жыл бұрын
Great job! 🧐
@DevDreamer
@DevDreamer 3 жыл бұрын
Thank you 🙂👍
@freguenshoodjean5841
@freguenshoodjean5841 Жыл бұрын
Where does this -1 came from plz ??
@adomicarts
@adomicarts 3 жыл бұрын
thanks!
@Mahek7704
@Mahek7704 3 жыл бұрын
👍
@callmeatk3604
@callmeatk3604 2 жыл бұрын
Please reply me i don't understand this ${characters[i]}
@tim6247
@tim6247 2 жыл бұрын
Can I turn the following into Ternary Operator? If so how? if (i === character.length - 1) { info += `and ${characters[i]}, `; } else { info += `${characters[i]}, `; }
@Robin_biju
@Robin_biju 2 жыл бұрын
const colours = ["red", "Orange", "Blue", "Pink", "black"] for (let i = 0; i < colours.length; i++) { console.log(`${colours[i]} is my fav colour`); } //Output:- // red is my fav colour // Orange is my fav colour // Blue is my fav colour // Pink is my fav colour // black is my fav colour
@dilip8496
@dilip8496 3 жыл бұрын
Hi Dev dreamer please upload full we development project as you done in a css project plzzz Dev dreamer upload video
@niloo2452
@niloo2452 2 жыл бұрын
( length - 1 ) how dose it work ? i didn't get this part
@ultronsam1214
@ultronsam1214 2 жыл бұрын
If I'm correct; here is my understanding of it. You know, since the array is four based on the number of items stored in CHARACTERS. Meaning, characters.length = 4 since that's the length of the array if we are to check it. Hence, character.length - 1 = 3, just like saying 4 - 1 = 3. Hope you understand.
@ultronsam1214
@ultronsam1214 2 жыл бұрын
Also, I guess what he meant in that if statement is that; if i = 3 OR i === characters.length - 1 also know as I === 4 - 1 which is = 3. We should loops around that or iterate(i++), iterate or gives us Sonic, Tails and Mario then append them to info += ` and ${characters[i], in this place. characters [i] which is equal to 3 based on characters.length -1 (or 4-1) is Luigi. That's how I guess he did. Not sure tho. I hope he sees this or anybody and correct if I'm wrong. Thanks!
@Queldorei
@Queldorei Жыл бұрын
The answer you're looking for lies in the index start value. First value of every array index is defined as 0(zero), so an array of four values would be indexed as 0, 1, 2, 3. Example; let names = ['Mike', 'Brad', 'John', 'Stupid Trump']; Total length of this array would be 4 as there are 4 values(names) in it but as every array index start from 0, Mike would be indexed as 0 and Trump would be indexed as 3. So when you say ".length -1", you are basically saying it to stop when the index value comes to 3 (4-1 or 'array length -1) which is equal to the last value of the index (3) which is Trump in this example case. Hope this helps!
@ca-lt1fc
@ca-lt1fc 3 жыл бұрын
can anyone explain why all of a sudden the variable began with const instead of let that we have been using with mostly everything?
@ultronsam1214
@ultronsam1214 2 жыл бұрын
I guess he used const since we are not going to be reassigning or redeclaring the array or characters.
#26 While/do while loop | JavaScript Full Tutorial
12:43
Dev Dreamer
Рет қаралды 12 М.
JavaScript Loops - Code This, Not That
8:36
Fireship
Рет қаралды 346 М.
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 21 МЛН
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 10 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 585 М.
#30 How to use JS Array Methods | JavaScript Full Tutorial
19:09
Dev Dreamer
Рет қаралды 11 М.
Learn JavaScript FOR LOOPS in 5 minutes! 🔂
5:45
Bro Code
Рет қаралды 31 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
5 Tips for Writing BETTER For Loops in JavaScript
16:15
James Q Quick
Рет қаралды 70 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Learn JavaScript Loops in 10 Minutes
10:34
dcode
Рет қаралды 18 М.
#44 What is the Spread Operator? | JavaScript Full Tutorial
16:01
JavaScript Loops Made Easy
10:52
codeSTACKr
Рет қаралды 168 М.