Ternary Operator - Javascript In Depth

preview_player
Показать описание
We take a look at the ternary operator in Javascript together. This allows us to shorten certain types of conditional statements down to a single expression. There are several caveats to using this syntax which we explore.

We also look at how this helps us with the newer arrow function expression syntax as well as within high-order array functions like map.

Chapters:
00:00 Introduction
00:37 Ternary Operator Intro
04:27 Ternary Code Example
09:13 Ternary in Functions
11:44 Ternary Function Examples
15:55 Arrow Function Expressions
17:58 Arrow Function Expression Example
20:51 Ternary with Array Map
22:53 Ternary Array Map Examples
26:51 Ternary Common Mistake
28:57 Nested Ternary Statements
33:22 Next Steps

Рекомендации по теме
Комментарии
Автор

i'm prepping for my software development bootcamp this playlist will come in handy

thabolikotsi
Автор

this was very important, the short arrow function syntax. earlier i use to get confuse when i read other people's code. and i was like, what the hell is this. now i got it.

shivamgupta
Автор

I’m kinda not the biggest fan of the “most efficient” syntax here. I appreciate what it does but it just seems a bit too nuanced in its application - not sure how much I’ll actually use it over maybe the less optimized ternary expression or even a good old if/else statement 🤷🏻‍♂️

tomboolery