Evaluating Conditional Statements in JavaScript by@malloai
646 reads

Evaluating Conditional Statements in JavaScript

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

In JavaScript, we use if / else / else statements to evaluate if a statement is true or false. If a condition is true, it’ll execute a certain action, if it is false, it won’t get inside on this block of code and will move further below to reach the next block. The possibilities of conditions checks are limitless thanks to the use of an else if statement, but too many else if statements may be bad if you end using 100 or more. An alternative to that, which is better when you’re having many cases to check, is to use a switch statement.
featured image - Evaluating Conditional Statements in JavaScript
Mallory Antomarchi HackerNoon profile picture

@malloai

Mallory Antomarchi

AI Engineer | JS | React


Receive Stories from @malloai


Credibility

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!