Did You Know This JavaScript Trick? (Logical Assignment)

Did You Know This JavaScript Trick? (Logical Assignment)

dcode

2 года назад

8,173 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@abiodun6897
@abiodun6897 - 17.02.2022 14:15

This is called short-circuiting too , right ?

Ответить
@dreamecho100
@dreamecho100 - 17.02.2022 14:30

🔥

Ответить
@mauro1518
@mauro1518 - 17.02.2022 14:47

Amazing content as usual!

Ответить
@user-vh3lm3qo4t
@user-vh3lm3qo4t - 17.02.2022 15:14

Nice

Ответить
@Dimich1993
@Dimich1993 - 17.02.2022 16:03

This is why people hate JS.
But a useful content!

Ответить
@MoonDesignDev
@MoonDesignDev - 17.02.2022 17:43

Oh that's awesome

Ответить
@Sammorris207
@Sammorris207 - 17.02.2022 17:51

Thanks

Ответить
@elementgames1774
@elementgames1774 - 17.02.2022 18:02

a &&= 20 is not equals if (a) { a = 20}

a &&= 20 is equals to a = a && 20
a ||= 20 is equals to a = a || 20
a ??= 20 is equals to a = a ?? 20

Both are one-line expressions. The only problem is understanding the new operators.

I have a feeling JavaScript will soon become similar with this abbreviation

a ??= false && 240 ? true : 0 ? undefined : null

Ответить
@remongrabu
@remongrabu - 17.02.2022 18:26

Very useful, thanks Dom!

Ответить
@DigitalFox-tutorials
@DigitalFox-tutorials - 17.02.2022 20:26

Nice video, thanks

Ответить
@yerenzter
@yerenzter - 17.02.2022 21:11

Yes it's AND and OR this logical gates are never forget to me.

Ответить
@ore_bear8045
@ore_bear8045 - 17.02.2022 22:20

but the code gets much harder to read and if somebody dont now this they get stuck when they maintaining your code, so use it with care....

Ответить
@عبدالقادرعبدالرحمنعبدالله
@عبدالقادرعبدالرحمنعبدالله - 17.02.2022 22:58

Wow !

Great an loved it.

Ответить
@yusufakkurt2308
@yusufakkurt2308 - 18.02.2022 01:01

Thank you ❤❤❤

Ответить
@beinyourguard
@beinyourguard - 18.02.2022 06:32

interesting

Ответить
@lev_bul
@lev_bul - 18.02.2022 09:14

all green!

Ответить
@khgriffi
@khgriffi - 18.02.2022 09:39

wow!!!

Ответить
@solomonjohn7231
@solomonjohn7231 - 20.02.2022 13:11

Thanks dude. Very helpful.

Ответить
@victorewaste7772
@victorewaste7772 - 21.02.2022 08:27

What font are you using in VS Code?

Ответить
@hassaneoutouaya
@hassaneoutouaya - 25.02.2022 22:04

THANK YOU !

Ответить
@vladostema
@vladostema - 22.03.2022 08:40

I am Subscribed from 3 accounts

Ответить
@BakuraRyuk
@BakuraRyuk - 30.03.2022 00:21

Thanks for the explanation! I got it now

Ответить
@augischadiegils.5109
@augischadiegils.5109 - 03.04.2022 03:03

❤️❤️❤️❤️

Ответить
@isuke01
@isuke01 - 22.09.2022 21:32

JS WHY SO SERIOUS :D
const tester = 12
let foo
foo = tester === 12 && ('YES') || ('NO')
console.log(foo) // YES

Ответить
@MightyKingKala
@MightyKingKala - 08.12.2022 00:49

thank you brother

Ответить
@eip408
@eip408 - 16.01.2023 00:16

very very informative Dom! Keep it up🔥

Ответить
@emausdetiquicia6636
@emausdetiquicia6636 - 08.10.2023 22:22

Good video. It deserves a like!

Ответить
@unknowned1113
@unknowned1113 - 26.10.2023 12:45

What's the difference between && and &&=?

Ответить
@skshahilakhtar895
@skshahilakhtar895 - 07.03.2024 18:33

simple and useful
thnks sir

Ответить
@rahimrahim2720
@rahimrahim2720 - 19.07.2024 20:41

thank you

Ответить
@hirozuki
@hirozuki - 16.09.2024 10:54

much more informative and easier to understand than the udeny course I paid for

Ответить