hands-on lab
Working with JavaScript Conditionals (If statements)
Difficulty: Intermediate
Duration: Up to 40 minutes
Students: 799
Rating: 3.1/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Description
In this lab, you will be working with JavaScript If Statements. An if
statement is a block of code that executes if a certain condition is met.
You will be working with an if
statement located inside of a function. You will use console.log()
to display the resulting value.
Learning Objectives
Upon completion of this lab, you will be able to:
- Write
if
statements - Add consecutive conditional statements with
else if
- Use the
else
statement when all other conditions are false
Intended Audience
- Beginners learning front-end development
- Software Engineers who need to learn front-end technologies to expand their skillset
Prerequisites
The following courses/courses and labs can ensure your success:
Updates
Nov. 23rd, 2021 - Resolved an issue causing the checks to unexpectedly fail in some cases
Covered topics
Lab steps
Introduction to JavaScript Labs
Create if statement
Execute if statement
Create else if statement
Create else statement