Javascript For Loop and While Loop | Javascript Tutorial For Beginners

  Рет қаралды 102,765

developedbyed

developedbyed

Күн бұрын

Check out my courses and become more creative!
developedbyed.com
Javascript For Loop and While Loop | Javascript Tutorial For Beginners
In this video series we are going to learn modern javascript from scratch. This video is recommended for anyone wanting to learn javascript the modern way with ES2015. No previous programming knowledge is required, so this video series will help you learn javascript as your first programming language.
We are going to take a look on how to create a foor loop, the modern and easy way using ES6. Another loop we can use is a while loop that takes a condition and it is going to run until the statement inside the while loop becomes false.
Things covered in this video:
How to create a for loop in javascript.
How to create a while loop in javascript.
📔 Materials used in this video:
VSCode: code.visualstu...
🛴 Follow me on:
Twitter: / deved94
Github: github.com/Dev...

Пікірлер: 67
@Wufyiofkes
@Wufyiofkes 4 ай бұрын
I know I’m late, but as a beginner coder, I would say this is the most concise tutorial to follow. Thank you so much for making this 🙏
@reptarwillsmiteyou
@reptarwillsmiteyou 4 жыл бұрын
I'm doing my bootcamp right now and im struggling, but this is super super helpful!
@DanBauer
@DanBauer Жыл бұрын
Hey did you end up getting a job in the field? I’m currently struggling with my own bootcamp and am skeptical about things improving honestly.
@alihedayat325
@alihedayat325 Жыл бұрын
Did you finish your boot camp and are you working
@nagy_noel13
@nagy_noel13 2 жыл бұрын
I'm having an IT exam tomorrow and this just saved me!!! thank you so much!!!!!
@sebipoiana1768
@sebipoiana1768 2 жыл бұрын
For those of you who got 'Uncaught TypeError: Assignment to constant variable' by copying his code, you need to add 'let' in front of name. The const is causing issues, because the array is declared as a constant and the name must be declared with 'let'. I am surprised he didn't get this error. If there is another way, I would be happy to know!
@snoopyrawr
@snoopyrawr Жыл бұрын
im surprised too i didnt get the error
@nemesisx8320
@nemesisx8320 4 жыл бұрын
he wasn't kidding when he said it will go crazy ...
@williamalesna5703
@williamalesna5703 3 жыл бұрын
I experienced that and restarted my computer lmao
@creatorsbyexweiv
@creatorsbyexweiv 3 жыл бұрын
@@williamalesna5703 I need to try that out fast with R5 2600X
@peteryu4353
@peteryu4353 5 жыл бұрын
Hi Ed, can you please explain the differences between for(let i = 0;.. vs for(i = 0;..? Why and when should I add a variable and when should I not? Thank you.
@adityakotian007
@adityakotian007 5 жыл бұрын
if you have declared the variable outside the loop you don't need to declare it inside. So in this example for(let i=0) if you have declared that there is a variable name i inside the loop. you could have also written let i; // now you are declaring the in the start for(i=0;i
@44aliano
@44aliano Жыл бұрын
as clear as water, thank you man
@rohinisampath
@rohinisampath 5 жыл бұрын
ur amazing dev
@corneliuduna7252
@corneliuduna7252 2 жыл бұрын
Love that intro beat? Is it original or can i find it somewhere? Thanks
@priyanzhu
@priyanzhu Жыл бұрын
I need it too
@badarkamil3974
@badarkamil3974 5 жыл бұрын
awesome, would tell me that can we access to Aray by invoking the numbers. Thanks
@grigorfanyan1821
@grigorfanyan1821 4 жыл бұрын
THANK YOU. THIS IS THE BEST TUTORIAL
@chriscorte6902
@chriscorte6902 3 жыл бұрын
well a lot of comments here seem to be thankful but I had no clue what you were talking about. it felt like you just started coding and didn't explain very well what you were doing. For example I didn't know why you created an array of strings, what an "of" statement is, or why you declared the "name" variable ahead of time. Then again, I might just not know enough yet. you explained the "===" operator very well but even then I had no idea why that worked because you declared NAMES, not NAME. you know, with an S. you do have a playlist for "JavaScript For Beginners" so you might just be pulling from that source.
@serious6037
@serious6037 2 жыл бұрын
Can you make the same tutorial but with document.getElementById?
@pxislee7186
@pxislee7186 Жыл бұрын
i need that too
@khanayan-v7z
@khanayan-v7z Жыл бұрын
i need that too
@cafe-tomate
@cafe-tomate 3 жыл бұрын
Hi Dev, I see you use name without declaring it const let or var. What will the "type" of name in this case as such ?
@prabanch8204
@prabanch8204 Жыл бұрын
You are awesome💗
@Iamjoelangel
@Iamjoelangel 4 жыл бұрын
Thankyou bro ...got to understnad the basic os while and for loops
@pedrocxbx
@pedrocxbx 4 жыл бұрын
You're the best man!
@jipeejoce1353
@jipeejoce1353 5 жыл бұрын
it gets false FROM 100, not 101 because the inequality is strict.
@codesetup265
@codesetup265 3 жыл бұрын
I think that javascript executes the code line by line but in the case of while loop without knowing the updation whether it is incremented or decremented how is it processing the code inside it? please solve my doubt here I stopped my JS course out there...
@zarifkarim953
@zarifkarim953 4 жыл бұрын
What video recorder did you use to make this vid?
@alwinvillero4404
@alwinvillero4404 3 жыл бұрын
obs studio
@dot32
@dot32 3 жыл бұрын
everyne uses obs
@priyanzhu
@priyanzhu Жыл бұрын
What was the intro music? Plz lemme know
@mohdhaseeb5155
@mohdhaseeb5155 5 жыл бұрын
can you please tell name of song running in background in video starting and ending
@fedus22
@fedus22 4 жыл бұрын
How can I get the index of the elements using the "of" syntax in the for loop?
@Tiago_Gun_Zalez
@Tiago_Gun_Zalez Жыл бұрын
Can you just called the for loop names?, like this: for (names) { }
@tomisinergy4963
@tomisinergy4963 4 жыл бұрын
I am dancing every time on the intro song.
@abdul391_
@abdul391_ 4 жыл бұрын
same 😁😂
@learntolove9223
@learntolove9223 4 жыл бұрын
wow excellent
@mariuscrn4905
@mariuscrn4905 3 жыл бұрын
Good video! Can you please tell me the name of the vscode theme? I love it.
@klaingarjosue
@klaingarjosue 4 жыл бұрын
beginner here, I had no problem running the code but I'd like to understand. You did loading++ at 6:16 , which makes loading's value go from 0 to 1. 1 is still < 100. So why does it work? I don't get how the value of loading is now more than 100
@chrisparsons289
@chrisparsons289 2 жыл бұрын
You've probably figured it out by now... but because loading++ is within the loop, after it confirms the condition is false it will go through the loop and then add 1 to the value of loading. It will do this over and over again (check the condition to see if it is true, if it is it will then add 1 to loading) until loading value = 100 at which point the loop will stop. This is because 100 is not less than 100 which makes the condition false, therefore stopping the loop.
@compilations756
@compilations756 4 жыл бұрын
bro so much similarities to python wow
@gravitowl
@gravitowl 4 жыл бұрын
Why does for(name of names){ console.log(name) } work but for(something of names){ console.log(name) } doesn't?
@gravitowl
@gravitowl 4 жыл бұрын
@@narayadewe7979 did it work? as i tried some other things and it didnt
@gravitowl
@gravitowl 4 жыл бұрын
@@narayadewe7979 k!
@gravitowl
@gravitowl 2 жыл бұрын
@@capslock3250 yeah this was 2 years ago but i mreading this back now and i dont get why i didnt get that lol
@usmanzai8748
@usmanzai8748 4 жыл бұрын
console.log(i didn't find do loop) thank you so much
@fedus22
@fedus22 4 жыл бұрын
You don't really need that
@ahmdm2036
@ahmdm2036 4 жыл бұрын
Well you forgot the quotes. What a noop programmer
@andranikhovhannisyan3715
@andranikhovhannisyan3715 4 жыл бұрын
dhey guys whatsup ? can someone explaing ? so i did this and get that result 99 why? let loading = 1; while(loading < 100) { console.log("website stil loading"); loading ++; } //and this example let loading = -1; while(loading < 100) { console.log("website stil loading"); loading ++; } //the result is 101 why it loops like that ?
@sergiuszrozycki
@sergiuszrozycki 4 жыл бұрын
You need to start from let loading = 0; then it will make 100 times to stop a loop.
@adamabusamra2447
@adamabusamra2447 4 жыл бұрын
Really appreciate you trying to explain the concept but to be honest, the video wasn't well structured. you jumped straight to ' for of ', you didn't even mention that it could be used without 'of' like -for (statement 1; statement 2; statement 3) - and then moved on to while loop and didn't even explain the syntax and the difference compared to 'for loop' and why use either one.
@deansofic914
@deansofic914 2 ай бұрын
"name is deprecated" why does it say that?
@T4yl4n1
@T4yl4n1 4 жыл бұрын
welp, everything went crazy...
@burr1to942
@burr1to942 3 жыл бұрын
I WAS THERE POGU
@GioFar
@GioFar 2 жыл бұрын
The first you show is a for...of Loop, not a for Loop as the title says.
@laurentaylor9579
@laurentaylor9579 3 жыл бұрын
Why $()? That part confused me
@GauthamKrishnan99
@GauthamKrishnan99 2 жыл бұрын
Refer the Concatenation video
@martinmclean5985
@martinmclean5985 4 жыл бұрын
Peace!
@dr_corrupt1014
@dr_corrupt1014 Жыл бұрын
who has the name of burrito ? @developedbye? 😂
@zefnreaj3548
@zefnreaj3548 4 жыл бұрын
I blocked my PC twice o|o
@Human_Evolution-
@Human_Evolution- 2 жыл бұрын
Text too small
@jjguillermo6059
@jjguillermo6059 2 жыл бұрын
I ran the code and my PC melted
@plw5522
@plw5522 4 жыл бұрын
Your screen texts are too small to view ☹️ comparing to other KZbinrs'
@naveedasgari8415
@naveedasgari8415 4 жыл бұрын
why is my ${} not working?!
@SmilesByShreya
@SmilesByShreya 3 жыл бұрын
Use backticks instead of single quotes
@hieuchu7115
@hieuchu7115 Жыл бұрын
Good video! Can you please tell me the name of the vscode theme? I love
Javascript Dom Manipulation | Javascript Tutorial For Beginners
16:50
developedbyed
Рет қаралды 209 М.
JavaScript Loops Made Easy
10:52
codeSTACKr
Рет қаралды 172 М.
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 15 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 285 МЛН
Learn JavaScript WHILE LOOPS in 8 minutes! 🔁
8:12
Bro Code
Рет қаралды 33 М.
JavaScript Loops
6:49
Programming with Mosh
Рет қаралды 428 М.
HTMX + GO 15 Minute Quickstart (For Javascript Devs)
16:59
developedbyed
Рет қаралды 27 М.
Javascript Arrays | Javascript Tutorial For Beginners
11:25
developedbyed
Рет қаралды 92 М.
For Loops - Beau teaches JavaScript
6:37
freeCodeCamp.org
Рет қаралды 96 М.
Top 5 Javascript Things You Should Know!
28:18
developedbyed
Рет қаралды 351 М.
Javascript If Else Statements | Javascript Tutorial For Beginners
11:41
Vanilla Javascript Smooth Scroll Tutorial
20:06
developedbyed
Рет қаралды 209 М.
Javascript Functions & Parameters | Javascript Tutorial For Beginners
14:27
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 15 МЛН