π» Get the full Modern JavaScript (novice to ninja) course from Udemy. Discount auto applied:
https://www.thenetninja.co.uk/udemy/modern-javascript
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 – https://github.com/iamshaunjp/modern-javascript
Original source
31 responses to “Modern JavaScript Tutorial #3 – Control Flow”
Thank you so much for all contents what you share.
Greetings from Brazil!
wy this guy go so fuckin fast im new to coding and i had to pause the video 234839123 times holy
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?
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);
thanks alot..
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?)
Bought the course!!!!! Thanks for making the course.
50:20 so global scope is accessible everywhere and can be reassigned but not re-declared from within the same global scope.
It can be re-declared from within another code block and the root global declaration can also be reassigned from within another code block.
Nested code blocks will look to their root for those rules as well, which is not considered the global root, but the root of that nested code block, unless its not declared in that root, then it would look to the global root
34:29 But why would you want or need to do this? Please give me a real world example if you can. (!false) <- exclamation makes false true. its just strange. its almost as if you are trying to cover it up or lie to the application
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?
really great course, helped me alot!
You sir have a loyal subscriber now.
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..?
I love the Switch Case example but I hate getting an E on a grade!
Can you make full crash course for tenserflow. Js big thanks keep up the good work!
Do scope rules never worked for variables declared with the VAR keyword in, for example, ES5?
It would be cool if you could create another gigantic course on Udemy, which covers all topics on modern CSS and HTML
Awesome ! Arigato
excellent
Controlling the flow is super helpful π₯ use conditionals evety day.
Ninjo, when are you starting react native series??
Now we have a new ninja to play with "chun-li" ππ.
Thanks buddy,
Greetings from Tanzania πΉπΏ
Hey Mr Ninja just a heads up sitepoint has a JS book called Novice to Ninja. I don't know if it matters but just for you to be aware! Thanks for the great videos as always.
@Shaun is the best Web Development teacher in the planet π π β€οΈ
Hey Shaun, this course from udemy will be fully available on youtube ?
Awesome! Any plans on making vids on CRUD and Dom manipulation?
Hey Shaun! Please make a video on MVC Architecture in JS
Fantastic, you really know how to make things entirely new concepts stick in just a few simple sentences.
YES! I've been waiting for this since the last one yesterday!
Thanks Mr Ninjaπ§ββοΈ
Get the full course here – https://www.udemy.com/modern-javascript-from-novice-to-ninja/?couponCode=NINJAYT