Modern JavaScript Tutorial #3 - Control Flow

  Рет қаралды 248,526

Net Ninja

Net Ninja

Күн бұрын

💻 Get the full Modern JavaScript (novice to ninja) course from Udemy. Discount auto applied:
www.thenetninja.co.uk/udemy/m...
In this modern JavaScript tutorial we'll take a look at different ways to control the flow of our code - for loops, while loops, if statements, else if statements, switches and more.
----------------------------------------
🐱‍💻 🐱‍💻 Course Links:
+ Course files - github.com/iamshaunjp/modern-...

Пікірлер: 171
@impressi5697
@impressi5697 4 жыл бұрын
For the very first time in my life, I can say I understand loops
@juansibs
@juansibs 3 жыл бұрын
I feel you man i feel you
@NetNinja
@NetNinja 5 жыл бұрын
Get the full course here - www.udemy.com/modern-javascript-from-novice-to-ninja/?couponCode=NINJAYT
@ashleysaleem-west5485
@ashleysaleem-west5485 5 жыл бұрын
Fantastic, you really know how to make things entirely new concepts stick in just a few simple sentences.
@ojikutuhakeem3106
@ojikutuhakeem3106 2 жыл бұрын
You are incredibly amazing, with the way you explain and make JS look too easy. I bless the day I came across your tutorials. Thank you. I hope you're doing ok.
@tomisinergy4963
@tomisinergy4963 4 жыл бұрын
I watch so manny of your tutorials when i hear your voice it bring me smile ( i am not gay )
@lewisjones284
@lewisjones284 4 жыл бұрын
Thank you for clarifying that you aren't gay
@wissa_
@wissa_ 4 жыл бұрын
Well, you are now
@randomtestuser_
@randomtestuser_ 4 жыл бұрын
@@lewisjones284 HAHHAHAAHHAHAHAHA
@saweranabi7786
@saweranabi7786 4 жыл бұрын
Hi Tomi, If you are not a gay, then according to this video, let me apply on you, LOOP, first a "for loop" and again and again a while loop, or maybe "if" and "else if" cases. hahaha
@labamap364
@labamap364 4 жыл бұрын
click lewis jones name to see what he has watched ... drill gay wut the
@tamellahajiyeva3007
@tamellahajiyeva3007 4 жыл бұрын
Thank you for the tutorials. You give such a clear explanation on every topic!
@mqh20
@mqh20 9 ай бұрын
This has to be the best channel to learn any js concept and even has videos on react/nextjs. And the way you explain it just makes sense unlike some other channels which overload us with jargon without explain what it means. Thanks for this course it has helped clear some of the main concepts of js and now I can move onto react and nextjs.
@jakobo5521
@jakobo5521 2 жыл бұрын
'For loop' explenation was just amazing. Thanks a lot! :)
@violet-trash
@violet-trash 5 жыл бұрын
YES! I've been waiting for this since the last one yesterday!
@AndyPerry1972
@AndyPerry1972 2 жыл бұрын
Well it's been a while but now back watching your excellent videos again as I want to get back in to coding after my degree! I have also just done something I have been meaning to do for a while now, and I have just subscribed to your Net Ninja Pro. Looking forward to these as I try to come somewhere near to a ninja! 🙂 I love your teaching style and everything just starts to make sense. Thanks Shaun and keep up the great work!
@NetNinja
@NetNinja 2 жыл бұрын
Thanks for the support and kind words Andy :) means a lot. Glad to help!
@itshan3014
@itshan3014 2 жыл бұрын
What an amazing tutorial ! The way you explain is straight to the point and very easy to understand! Thank you so much for such incredible free JS courses!
@NetNinja
@NetNinja 2 жыл бұрын
No problem Han :) glad you enjoyed it!
@khaledfarghly6480
@khaledfarghly6480 3 жыл бұрын
Thanks for you'r tutorials. You always give me a clear explanation .
@lakshithwithana5775
@lakshithwithana5775 3 жыл бұрын
again and again, the best online coding tutor ❤
@jensv8859
@jensv8859 Жыл бұрын
Dude you are already a legend. Helps me so much!
@NetNinja
@NetNinja Жыл бұрын
Glad to hear it! :) thanks for watching
@devilslayer6534
@devilslayer6534 2 жыл бұрын
You helped me get a good paying job. Thank you.
@agataa.8411
@agataa.8411 Жыл бұрын
I was looking for the step by step tutorial for very beginners like me. And, finally, I've found it! Thank you! Thank you so much! It is just what I need!
@NetNinja
@NetNinja Жыл бұрын
You're so welcome! Hope it's helpful :)
@nagliskontrimas6916
@nagliskontrimas6916 3 жыл бұрын
I like how this guy explains evverything, amazing!
@rizanmrm
@rizanmrm Жыл бұрын
Youre the best teacher I have seen in KZfaq. Thank you for the amazing work Shaun
@NetNinja
@NetNinja Жыл бұрын
Thanks Rizan, that means a lot :)
@HostDotPromo
@HostDotPromo 5 жыл бұрын
Controlling the flow is super helpful 🔥 use conditionals evety day.
@christinepellicane6689
@christinepellicane6689 3 жыл бұрын
Great stuff! My only critique would be not to hide the console while you're working on the code- there seems to be plenty of room to show both at the same time. Thanks for this!
@HerlonCosta
@HerlonCosta 4 жыл бұрын
Thank you so much for all contents what you share. Greetings from Brazil!
@ghost_monacodm6362
@ghost_monacodm6362 10 ай бұрын
This is best JavaScript teacher I have ever seen on KZfaq. You explained thoroughly and I understand every bit of it. Thank you very much for this video
@NetNinja
@NetNinja 10 ай бұрын
That means a lot, thank you :)
@yinonb172
@yinonb172 3 жыл бұрын
Best JavaScript Tutorial, I bought the full course and it is excellent ! , Arrigato Net Ninja San !
@chinedujonathan4238
@chinedujonathan4238 23 күн бұрын
This video helped me understand more about Control flow. Thank you!
@andreaskudumo4292
@andreaskudumo4292 2 жыл бұрын
I'm straight but this man's voice is one of the reasons this is my preffered channel for dev tutorials
@andrewcbuensalida
@andrewcbuensalida 4 жыл бұрын
The Khan Academy of Coding! You're a legend!
@lojicjay
@lojicjay 2 жыл бұрын
I wasn't aware that Shaun was a character option in Street Fighter, but I think I know why. Shaun is a ninja, and a good one at that. So good, in fact, that I couldn't even find him on the character menu. Well played, sir, well played.
@segunakinwumi9856
@segunakinwumi9856 Жыл бұрын
It's one thing to know coding, It another to know how to teach it. You have it all.
@NetNinja
@NetNinja Жыл бұрын
Thanks for the kind words Segun :)
@lockborethdevid3533
@lockborethdevid3533 2 жыл бұрын
Net Ninja and Telusko is my both perfect tutor ✌️✨ The way they explain thing is perfect ✨🎉
@saltpie5176
@saltpie5176 3 жыл бұрын
this video helped me to understand the reason why do i need to use let and const instead of var
@user-em9kt2xc1b
@user-em9kt2xc1b 2 жыл бұрын
Well explained and make things clear to beginners, thx!
@pauldahl2466
@pauldahl2466 3 жыл бұрын
You are an excellent Instructor.
@raymondmichael4987
@raymondmichael4987 5 жыл бұрын
Now we have a new ninja to play with "chun-li" 😉😉. Thanks buddy, Greetings from Tanzania 🇹🇿
@theblessedcoder
@theblessedcoder Жыл бұрын
You're a great teacher, thank you for simplifying these concepts.. Do you have a course on data structures and algorithm?
@barkhadawil9689
@barkhadawil9689 Жыл бұрын
Thanks Shaun your tutorial helped me a lot, you are truly amazing person, God bless you.
@NetNinja
@NetNinja Жыл бұрын
Thanks Barkhad! :)
@kennedymusyoki751
@kennedymusyoki751 Ай бұрын
Helpful tricks to get started with JavaScript journey.
@Omar_Muhammad
@Omar_Muhammad 3 жыл бұрын
Thanks a lot, man u get me on the tracks
@Luca_Swan
@Luca_Swan 3 жыл бұрын
Thank you~ Best coding teacher on KZfaq. T_T
@itshamiiid
@itshamiiid 2 жыл бұрын
great series of tutorials. very helpful and informative. thanks
@NetNinja
@NetNinja 2 жыл бұрын
You're very welcome!
@andersontiban5356
@andersontiban5356 2 жыл бұрын
this video has helped me out alot thanks
@guitarpracticewithnate
@guitarpracticewithnate 2 жыл бұрын
Your videos are great! Keep up the great work! :-)
@sneharaj3191
@sneharaj3191 5 ай бұрын
Thank you so much for this lessons.....you are really a great teacher 🙏🙏
@NetNinja
@NetNinja 5 ай бұрын
Thank you! 😃 hope you found it helpful
@PT-Tl1
@PT-Tl1 4 жыл бұрын
Bought the course!!!!! Thanks for making the course.
@NetNinja
@NetNinja 4 жыл бұрын
Thanks so much, hope you enjoy it! :)
@ashramya7579
@ashramya7579 4 жыл бұрын
The Net Ninja : Yes, it’s really very nice. Thanks for making such fantastic course.
@siri7731
@siri7731 2 жыл бұрын
Thank you for these helpful videos
@sh4ndes
@sh4ndes 3 жыл бұрын
7:41 Ninja: Does that make sense? Me: No, not really... Ninja: Cool!
@sayemarg
@sayemarg 3 жыл бұрын
Good Tutorial As Always ❤️😎
@AKagNA
@AKagNA 4 жыл бұрын
So Shaun, is it possible us to use the first defined "Age" variable inside 2nd code block when we actually define another "age" variable inside 1st code block? Would like to hear an answer, very good video.
@phraggers
@phraggers 2 ай бұрын
I was so nervous having to learn a new language, especially all the web dev languages (which as a C programmer is a terrifying prospect) but all this makes me VERY happy! I just had to learn LUA and it was a nightmare, what an awful language. at least JS, though it has its problems, follows reasonable syntax. Just watching this playlist on 2x speed, and slowing down when something is different to C, lol
@geralddarkobekoe
@geralddarkobekoe 5 жыл бұрын
You sir have a loyal subscriber now.
@NetNinja
@NetNinja 5 жыл бұрын
Thank you :)
@yohanesdebebe8843
@yohanesdebebe8843 2 жыл бұрын
Thank You very much sir Subscribed with Joy
@theworldisyours7437
@theworldisyours7437 5 жыл бұрын
Can you make full crash course for tenserflow. Js big thanks keep up the good work!
@adamtak3128
@adamtak3128 5 жыл бұрын
Awesome! Any plans on making vids on CRUD and Dom manipulation?
@Assassins_Wish
@Assassins_Wish 4 жыл бұрын
15:45 or you could just do "while(i
@Martin958
@Martin958 Ай бұрын
Point of note at 48:50: The reason the variable 'name' does not show undefined is because it is accessing the global window objects namespace word of 'name' which is currently blank.
@victoriamatthew1217
@victoriamatthew1217 4 жыл бұрын
You are the best my sifu ! ;)
@MrNeogoyal
@MrNeogoyal 5 жыл бұрын
Hey Shaun! Please make a video on MVC Architecture in JS
@alii4334
@alii4334 4 жыл бұрын
it would great if there is an outline in the description for long videos. thanks
@kadamizu
@kadamizu 5 жыл бұрын
really great course, helped me alot!
@oilblog1460
@oilblog1460 5 жыл бұрын
Hello there.. your tutorials are very good. I have enjoyed them so far. Do you have a book..or an ebook covering what you cover on here..?
@NetNinja
@NetNinja 5 жыл бұрын
Hey its just tutorials, no book!
@ahmadmahadi8827
@ahmadmahadi8827 8 ай бұрын
The main benefit of scope is to avoid naming conflict.
@evonneokoye713
@evonneokoye713 4 жыл бұрын
hey please could you do a tutorial on data structures and algorithms in javascript? THANK U!!!
@taunado
@taunado Жыл бұрын
Nice! Thanks
@audiomziki4315
@audiomziki4315 2 жыл бұрын
I think that seeing pink at the start of his videos relaxes my nerves into thinking its easy
@GisellyRock
@GisellyRock Жыл бұрын
Very nice!
@TheNewVie
@TheNewVie 2 жыл бұрын
Thank youu!!
@mkhatri007
@mkhatri007 4 жыл бұрын
thanks alot..
@donow4633
@donow4633 5 жыл бұрын
Awesome ! Arigato
@infotainment999
@infotainment999 5 жыл бұрын
I love the Switch Case example but I hate getting an E on a grade!
@daniellaerachannel
@daniellaerachannel 5 жыл бұрын
excellent
@ibrahimalmuseimi164
@ibrahimalmuseimi164 10 ай бұрын
Fantastic, you really know how to make things entirely new concepts stick in just a few simple sentences , but i have a question in 51:31 you change from let to const how to do that in the same time
@markovincic4386
@markovincic4386 9 ай бұрын
put your pointer/cursor behind them by using ctrl+LMB and select them all, then delete and write a new word :)
@OnlineCashFlowZone
@OnlineCashFlowZone 7 ай бұрын
Easy to understand, perfect💌💌 tutorial #The Net Ninja🤟🤟
@NetNinja
@NetNinja 7 ай бұрын
🙌 Thank you!!
@paakofibamfoquaicoe4193
@paakofibamfoquaicoe4193 5 жыл бұрын
Thanks Mr Ninja🧛‍♂️
@paakofibamfoquaicoe4193
@paakofibamfoquaicoe4193 5 жыл бұрын
Please, have been trying to download the files from github but i can't access it...any help🙆‍♂️
@NetNinja
@NetNinja 5 жыл бұрын
Hey - have you selected the correct branch for each lesson, as shown in the first video? After that you just click on the big green 'dowload zip' button.
@sapthagirisreedharrun5162
@sapthagirisreedharrun5162 4 жыл бұрын
Please post the other part of the course also from udemy !
@andrewcbuensalida
@andrewcbuensalida 4 жыл бұрын
in the variables and block scope lesson, when you console.log the name outside of the block, shouldn't it have been undeclared?
@MrIshumaru
@MrIshumaru 3 жыл бұрын
Finally someone explains what a global is without using a buncha jargon that makes no sense
@johnconnor9787
@johnconnor9787 5 жыл бұрын
Do scope rules never worked for variables declared with the VAR keyword in, for example, ES5?
@enochbinas5074
@enochbinas5074 3 жыл бұрын
20:33 we can use \'s for apostrophes. 'that\'s a lot of ninjas'
@derrick8044
@derrick8044 Жыл бұрын
44:54 block level scope w/ vars scope - area
@johnconnor9787
@johnconnor9787 5 жыл бұрын
It would be cool if you could create another gigantic course on Udemy, which covers all topics on modern CSS and HTML
@jennifermiller678
@jennifermiller678 4 жыл бұрын
Hello Net ninja I really love your courses. Is there any coupons you can share for your selenium with Java course on Udemy. I am really interested in learning that.
@NetNinja
@NetNinja 4 жыл бұрын
Hey Jennifer, the link below has the discount auto applied, hope you enjoy the course :D www.thenetninja.co.uk/udemy/modern-javascript
@lancer7344
@lancer7344 3 жыл бұрын
Net ninja best of the best
@davidadrian8744
@davidadrian8744 3 жыл бұрын
hey ninja,can you tell me with waht console.log helps me? i mean,i do not get it
@niveditasharma5559
@niveditasharma5559 3 жыл бұрын
Owoaahhhhhhhh Dude, Your tutorial is awesome !!! JavaScript is no longer tough !!! Keep adding KUNG FU VIDEOS !!!
@nuj427
@nuj427 Жыл бұрын
FYI (to noobies), don't try the for loops / while loops with auto save on in vs code (unless you type really fast lol).. even on a decent M1 pro, my Chrome browser crashed and it was so stuck it wouldn't even quit. Had to manually force quit lol.
@erandaca1732
@erandaca1732 3 жыл бұрын
12:13 I had just run it when you said it XD
@hassanqamar4716
@hassanqamar4716 4 жыл бұрын
Hi !! Shaun Please tell me the discount on this javascript udemy course i wanna buy it Right now
@TheGryphon14
@TheGryphon14 4 жыл бұрын
48:50 Shaun, I wonder why didn't you get "Uncaught ReferenceError: name is not defined" on line 10
@maurov2104
@maurov2104 4 жыл бұрын
Yeah, that was weird. An explanation might be found here: developer.mozilla.org/en-US/docs/Web/API/Window/name
@vidyanath16
@vidyanath16 3 жыл бұрын
In java script if u don't declare variables but try to use them like he did at 48.50.. java script automatically creates new variable and assigns null to it. That's the reason we don't see any error here
@TheGryphon14
@TheGryphon14 3 жыл бұрын
@@maurov2104 right... I forgot that Window.name exists
@TheGryphon14
@TheGryphon14 3 жыл бұрын
@@vidyanath16 there's no such thing. It's actually because window has "name" property
@Wi3rzb0
@Wi3rzb0 4 жыл бұрын
Wouldn't it be better, if you always use `` for strings?
@tyronebaldwin1027
@tyronebaldwin1027 2 жыл бұрын
Hello Net Ninja, how can I get this for $9.99 the coupon code not allow me to do that. Is there another code I can use.?
@azizkazimovlikes9069
@azizkazimovlikes9069 2 жыл бұрын
Love your videos!! , but I had a problem with my Windows 10 pro the browser is not working and I couldn't close it for a while , than when it reached 36,000 ish numbers it closed . Man if you just said it faster I would have not been in pain and fear
@adiemar3974
@adiemar3974 3 жыл бұрын
cool enough for me (:
@Wi3rzb0
@Wi3rzb0 4 жыл бұрын
14:56 when i put " ; " at the end of line 12 and 13 i get error that says: " , " expected. Why is that so? VS Code tells me to use comas instead of semicolons
@carolinmuller2139
@carolinmuller2139 4 жыл бұрын
try this: for (i = 0; i < 5; i++) ;)
@antondubrovin7582
@antondubrovin7582 4 жыл бұрын
Hi! Thank You for the course! I have a problem with "continue"- everything works, but zero still appears in the console( let scores = [25, 50, 0, 30, 100, 90, 40]; for (let i = 0; i < scores.length; i++) { console.log(scores[i]); if (scores[i] === 0) { console.log("next!"); continue; } if (scores[i] === 100) { console.log("Congrats! you have made it!"); break; } } I checked everything, but i don't see my mistake. Could you, please, tell me what is wrong?)
@bonniethuku241
@bonniethuku241 4 жыл бұрын
you have console.log(scores[i]); before the code block checking for zero
@antondubrovin7582
@antondubrovin7582 4 жыл бұрын
@@bonniethuku241 Thanks for you help!)
@Gavrev
@Gavrev 4 ай бұрын
That for loop structure in the example at 35:05 is really irritating by not lending itself to visually linear code..
@castlemoyle
@castlemoyle 4 жыл бұрын
Different consoles give different answers? I'm using the console built into Code, not firefox or chrome. about 48:00 or so where you're teaching the block scope, if I declare "age" in the root and let name = 'shaun' ONLY in the first code block, when I console.log (age, name); out in the root again (outside of the first code block) I get a "name is not defined" error where you get just a space (or maybe nothing) for the "name" in your console.log. Here's my code let age = 30; if (true) { let name = "bob"; } console.log("outside: ", age, name);
@joshuajurado2565
@joshuajurado2565 5 жыл бұрын
Hey Shaun! I was look at the your modern JS course and i notice that all videos you have here from Intro to DOM is the same as first 6 in your full course. Am i right?
@NetNinja
@NetNinja 5 жыл бұрын
Hey, correct :). It’s a free preview of the udemy course. The first 6 chapters.
@joshuajurado2565
@joshuajurado2565 5 жыл бұрын
The Net Ninja thanks for the quick response, as soon as a finish these free tutorials. I will purchase your course Thank you
@NetNinja
@NetNinja 5 жыл бұрын
Thank you so much. Really hope you enjoy it!!
@sankhadipsamanta7708
@sankhadipsamanta7708 5 жыл бұрын
Ninjo, when are you starting react native series??
@NetNinja
@NetNinja 5 жыл бұрын
Hey, in 2 or 3 weeks. I'm doing a Firebase hosting & PWA series first :)
@sankhadipsamanta7708
@sankhadipsamanta7708 5 жыл бұрын
@@NetNinja Ok ninjo, by the way i love your everything. You tell us everything in just few minutes video. Every line you say is important. Also Like your teaching style. Best tutorial to learn technology in less time
@rebeka1212100
@rebeka1212100 5 жыл бұрын
@@NetNinja 😙👏
@ozgekirmizigul
@ozgekirmizigul 4 жыл бұрын
Does "or" work like "else if"? Ex1: if((a||b||c)>=12) {} Ex2: if(a>=12){} else if(b>=12){} else if(c>=12){}
@milanmalovic6424
@milanmalovic6424 4 жыл бұрын
48:47 - Why didn't it show an error? You tried to log the name into console but it only ignores it because it's defined in the inside code block, but then it should pop an error, isn't it?
@user-vb2zx1ht9b
@user-vb2zx1ht9b 4 жыл бұрын
Yes, I also think it should pop an error because the 'name' is not defined
@makedonce25
@makedonce25 Жыл бұрын
how come i can hear your mouse click, and not the keyboard typing sound? what kind of sorcery is that ?
Modern JavaScript Tutorial #4 - Functions
43:34
Net Ninja
Рет қаралды 355 М.
why are switch statements so HECKIN fast?
11:03
Low Level Learning
Рет қаралды 390 М.
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 6 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 55 МЛН
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,8 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 32 МЛН
Learn Web Development And ACTUALLY Get A Job | Ultimate Guide
1:33:52
James Cross
Рет қаралды 1,3 МЛН
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 422 М.
10 Design Patterns Explained in 10 Minutes
11:04
Fireship
Рет қаралды 2,2 МЛН
Modern JavaScript Tutorial #6 - The Document Object Model
53:39
Net Ninja
Рет қаралды 263 М.
While loops in Python are easy ♾️
6:58
Bro Code
Рет қаралды 324 М.
JavaScript Tutorial for Beginners: Learn JavaScript in 1 Hour
48:17
Programming with Mosh
Рет қаралды 12 МЛН
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 6 МЛН