Comparison Operators & If Else - Beau teaches JavaScript

  Рет қаралды 22,953

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Learn about comparison operators. Also, if else statements!
Code
🔗 codepen.io/beau...
Other resources on topic:
🔗 developer.mozi...
Beau Carnes on Twitter: / carnesbeau
⭐JavaScript Playlists⭐
▶JavaScript Basics: • JavaScript Basics Course
▶ES6: • ES6 - Beau teaches Jav...
▶Design Patterns: • Design Patterns - Beau...
▶Data Structures and Algorithms: • Data Structures and Al...
▶Clean Code: • Clean Code - Beau teac...
-
We're busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.
Join our community at freecodecamp.com
Follow us on twitter: / freecodecamp
Like us on Facebook: / freecodecamp
Follow Quincy on Quora: www.quora.com/...

Пікірлер: 18
@eeekkk34235
@eeekkk34235 7 жыл бұрын
With the if...else statements failing on baby, another way other than swapping could be: if else (age > 2 && age < 18) console.log("You are a child");
@AbhinavSharma_sylar
@AbhinavSharma_sylar 7 жыл бұрын
You mentioned whenever we have an expression with an assignment to a number, inside the if condition, it is always going to evaluate to TRUE. but that is only if the assignment is for a non-zero number for ex: if (age = 1) will be, true if (age = 0) will be, false if (age = 0.0) will be, false
@motthebug
@motthebug 7 жыл бұрын
Good point (tho' the point is that it means something different from asking if it's equal...)
@pilyglot3037
@pilyglot3037 7 жыл бұрын
The alligator always eats the bigger number... it's greedy that way. (how I learned < and >)
@farkhadmusazov7226
@farkhadmusazov7226 2 жыл бұрын
that's so cute and handy
@pradeepchand8178
@pradeepchand8178 6 жыл бұрын
how to solve a multiple if statement with in a single function example program is function testLessThan(val) { if (val < ) { return "Under 25"; } else if (val < ) { return "Under 55"; } return "55 or Over"; } // Change this value to test testLessThan(10);
@thomasgeorge4578
@thomasgeorge4578 6 жыл бұрын
this so similar to python!
@Fichleai
@Fichleai 7 жыл бұрын
What about === and !== ?
@BeauCarnes
@BeauCarnes 7 жыл бұрын
Albin Metthey I have a "=== vs ==" video coming out soon but it may have been good to include those in this video.
@sasha_prisyazhnyy
@sasha_prisyazhnyy 6 жыл бұрын
Mr. Carnes explicitly says in the very end of the video that this information is covered in later videos. I think the aim of the course is to give the information by small comprehensible bits to get the basic idea of the concepts.
@xortegaccaedu
@xortegaccaedu 6 жыл бұрын
Please slowwwwww down. Love what you are doing.
@hashtagtrends9886
@hashtagtrends9886 4 жыл бұрын
Thank You @t !
@farkhadmusazov7226
@farkhadmusazov7226 2 жыл бұрын
thank u
@Allaboutdatps3
@Allaboutdatps3 4 жыл бұрын
Makes perfect sense, thanks.
@aaronargottelopez3488
@aaronargottelopez3488 4 жыл бұрын
@reaperforever8478
@reaperforever8478 6 жыл бұрын
Which software is it ?
@cheesecake8620
@cheesecake8620 2 жыл бұрын
Codepen
@MylesGmail
@MylesGmail 6 жыл бұрын
Thx!!!!!
== vs === - Beau teaches JavaScript
3:06
freeCodeCamp.org
Рет қаралды 45 М.
#18 JS Comparison Operators | JavaScript Full Tutorial
14:10
Dev Dreamer
Рет қаралды 6 М.
Ozoda - Lada ( Official Music Video 2024 )
06:07
Ozoda
Рет қаралды 17 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 2,9 МЛН
Objects - Beau teaches JavaScript
8:40
freeCodeCamp.org
Рет қаралды 42 М.
Functions - Beau teaches JavaScript
7:18
freeCodeCamp.org
Рет қаралды 69 М.
JavaScript Beginners Tutorial 9 | Comparison Operators
6:52
Automation Step by Step
Рет қаралды 13 М.
Data Types - Beau teaches JavaScript
6:34
freeCodeCamp.org
Рет қаралды 65 М.
FastAPI Course for Beginners
1:04:33
freeCodeCamp.org
Рет қаралды 330 М.
Common Array Methods - Beau teaches JavaScript
6:46
freeCodeCamp.org
Рет қаралды 65 М.
Inheritance in JavaScript - Prototypal Inheritance tutorial
20:06
JS Tutorial: Find if Two Object Values are Equal to Each Other
14:24
Ozoda - Lada ( Official Music Video 2024 )
06:07
Ozoda
Рет қаралды 17 МЛН