In this walkthrough we take a look at If…Else Statements on Codecademy JavaScript Intro Course. This lesson builds on our previous lesson which taught us about the “if” conditional statement. We learned that we are able to use “if” conditional logic to find out if a statement is true, and if it is true, we can run a block of code. In this lesson we learn that we can use the “else” keyword to run another code block, if the first if condition evaluates to false. Understanding the else conditional logic keyword is vital in understanding programming from now until forever, so please understand it before moving onto the next javascript lesson!
In this video, we dive into the world of JavaScript If Else Statements and learn about conditional statements with Codecademy. Building upon our previous lesson, where we learned about the “if” conditional statement, we now explore the “else” keyword and how it works in conditional logic. If the first “if” condition evaluates to false, the “else” statement is executed, allowing us to perform different actions based on different conditions. As a programmer, understanding this fundamental concept of conditional logic is essential to writing efficient and effective code in JavaScript. By the end of this lesson, you will have a clear understanding of the “if else” statement and be well-equipped to tackle more advanced programming challenges in JavaScript. So, take your time and make sure to fully grasp the concept before moving on to the next lesson on your Codecademy JavaScript journey!