Featured

JavaScript for Beginners Lesson #12 If Statements | Else Statements

Thanks! Share it with your friends!

You disliked this video. Thanks for the feedback!


Added by miamigo
111 Views
In this lesson, we will learn about if statements and else statements in JavaScript. These types of statements are known as conditional statements and allow us to control the flow of a program.

JavaScript Playlist:
https://youtube.com/playlist?list=PLgIi4lM74yW2Mc8iFRJMgvamNWOOFDH-q

0:00 what is a conditional statement in JavaScript
0:34 setting up variables
1:05 revisiting comparison operators
1:48 setting up console.log() statements
2:23 thinking about the program
3:03 viewing the inital output in the terminal
3:16 introducing the if statement
4:09 viewing the updated output in the terminal
4:47 introducing the else statement
5:25 viewing the updated output in the terminal
5:50 what is code block MDN page
6:27 if/else statements MDN page
7:07 single line if/else statements with no braces
7:43 updating the condition with a comparison operator
8:08 viewing a second example with if/else statements

MDN if statement:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else

MDN code block page:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/block

NodeJS:
nodejs.org

VS Code:
code.visualstudio.com

Post your comment

Comments

Be the first to comment