JavaScript == VS ===

JavaScript == VS ===

Web Dev Simplified

5 лет назад

43,640 Просмотров

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


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

@goddamnchampions1096
@goddamnchampions1096 - 27.01.2023 17:52

haha i spent too long trying to figure this out with google, just to fully understand it a minute into this video. Thanks!

Ответить
@iangunness1977
@iangunness1977 - 03.11.2022 13:00

Thank you!!! Didnt make sense until I watched this video

Ответить
@SoloWanderer25
@SoloWanderer25 - 11.10.2022 17:14

10 minutes ago, I was asked this question in a mentoring session, And the answer I gave was not up to the mark; Thank-you @Web Dev Simplified, for such simple, yet very useful little information!

Ответить
@p._7555
@p._7555 - 08.07.2022 02:57

What extensión are you using on vscode?

Ответить
@bsummer
@bsummer - 25.06.2022 17:13

I left freecodeacademy to come understand it here.. Thanks

Ответить
@petersaul81
@petersaul81 - 04.06.2022 19:29

.... Chop lucid Indianapolis. UNM 1991 lobo Theodore .....===================

Ответить
@consig1iere294
@consig1iere294 - 25.01.2022 20:59

Kyle should have mentioned the actual terms of == and === because that is where the confusion clears out. A double equals is "abstract" and triple equals is "strict". People who use the abstract equals should be aware of it before using it.

Ответить
@bishap100
@bishap100 - 04.01.2022 21:05

You didnt explained about comparing between two pass by reference data which have same value.

Ответить
@bvsanchez6161
@bvsanchez6161 - 21.09.2021 20:30

Appreciate the help

Ответить
@undercrackers56
@undercrackers56 - 04.09.2021 17:54

In my opinion the implementation of equals signs is evidence that Javascript is a hideous language. Maybe it started out with good intention of being simple or easy, but out of bad design and lack of forethought has grown into a language that encourages bad coding practice and gives the programmer loads of scope to get things wrong. For what? To save some typing? If you want to code then learn to f**** type.

Ответить
@brentbecker9363
@brentbecker9363 - 26.08.2021 09:27

Perfect Explanation!!

Ответить
@mdosmangani2691
@mdosmangani2691 - 18.08.2021 19:22

You are awesome sir
I am watching your tutorial about 2 hours every day to learn and develop my skill
Go ahead

Ответить
@nikolaninkov3341
@nikolaninkov3341 - 07.07.2021 22:30

typescript is the best
just saying

Ответить
@oddity4650
@oddity4650 - 06.07.2021 20:15

I think i got it.. so I are you saying double == is saying 0 or 1 etc is equal to a empty space, because a empty space is also a character? Or if it was a letter or word etc instead of that empty space

But when you use triple === it means it only allows that 1 to be true if that empty space is also another number, but as it is a empty space it will treat it as a non number, so it would mean it is false, when using ===?

Ответить
@shaforthedayy5644
@shaforthedayy5644 - 27.06.2021 01:49

don’t go to chuckecheese no more

Ответить
@jainavagarwal8698
@jainavagarwal8698 - 07.06.2021 17:50

muchas gracious

Ответить
@OleksandrGrugorovuch
@OleksandrGrugorovuch - 27.05.2021 08:45

thanks

Ответить
@void9227
@void9227 - 18.05.2021 02:35

A sticker on a chunky cheers mirror send me to this video when I scanned it

Ответить
@venusselene7027
@venusselene7027 - 16.05.2021 02:39

i found this qr code in cuck e cheese and it led me here

Ответить
@deansprivatearchive
@deansprivatearchive - 14.04.2021 01:12

"You need to stop, you need to stop, ..."

Ответить
@deansprivatearchive
@deansprivatearchive - 03.04.2021 03:57

Last thing is "single quotes"

Ответить
@deansprivatearchive
@deansprivatearchive - 10.03.2021 06:59

I know it's 2021 now, but, blindly, I'll say that Kyle likes using the unstrict "!=" with "null" that's a variation of what he despises in this video. If this is the one use case he accepts, I'll feel so dumb...

EDIT: [true, this[0]]

["WHAT THE HECK?!?", this[0]]

Ответить
@spreadhysteria3650
@spreadhysteria3650 - 26.09.2020 13:06

Thanks

Ответить
@somtovitus
@somtovitus - 09.09.2020 13:22

thank you thank you

Ответить
@StrangeIndeed
@StrangeIndeed - 25.06.2020 21:15

You said that 'obviously 0 is not the same as false'. But in C, C++, Python (and even maths) false is literally 0
So I assume that in JS false is a completely different data type right? For me it makes a lot more sense that false is just fancy way of saying 0

Ответить
@baatar
@baatar - 04.06.2020 22:32

You may or may not know this but you don't know just how valuable these short one-off, advisory videos actually are to the development community. They are just as valuable, if not more, than a lengthy full-featured tutorial video. Please continue making more!

Ответить
@ericlee3587
@ericlee3587 - 04.06.2020 16:17

The best video on this topic ever! Concise and well elaborated. Thank you

Ответить
@abdurrahmanahmed7057
@abdurrahmanahmed7057 - 26.04.2020 13:13

What about cases in comparing arrays and objects? [0] === [0] returns false.

Ответить
@alfiejones9083
@alfiejones9083 - 12.01.2020 13:53

==

Ответить
@LSDsuperfruit
@LSDsuperfruit - 04.11.2019 20:24

does that apply only in javascript?

Ответить
@vibonacci
@vibonacci - 20.10.2019 19:16

Double equals is also slower due to the type casting

Ответить
@moazelsawaf2000
@moazelsawaf2000 - 16.08.2019 06:10

Thanks sir <3

Ответить
@crugg
@crugg - 20.06.2019 12:44

Awesome video. Could you maybe also do a video on what the difference between ' and " are, if there are any? Codacy always tells me, I should use " instead of '

Ответить
@toddroberts7886
@toddroberts7886 - 01.06.2019 06:07

Better yet, simply learn the rules of coercion (you've already shared most of them here, which was the real value of this video!). Only a few of them are unintuitive (like [anything] == [boolean]), but when do you actually write expressions like that if you're not a crazy person? For the informed, coercion is a convenient tool that, as you've said, other languages don't have.

You have to weigh the cost of encouraging devs to be lazy and scared vs. the risk of them doing damage with ==. The former is real. People start thinking they "know js" because they use === (which is *anti knowledge*) and they become complacent. Once coercion is understood, the latter is nearly nonexistent.

Ответить
@gmani5860
@gmani5860 - 01.05.2019 10:34

Honestly , you make it easy to understand for those who are not familiar in JS

Ответить
@developedbyed
@developedbyed - 26.01.2019 14:42

Dope channel! You need a few thousand subs!

Ответить
@andersonhall08
@andersonhall08 - 25.01.2019 18:35

Enjoying your videos, man. What software do you use to record your videos/share your screen? I've been thinking about doing some tutorials myself.

Ответить
@chrisdanikas7918
@chrisdanikas7918 - 24.01.2019 23:54

You're getting better with every video dude, good work.

Ответить
@Knards
@Knards - 24.01.2019 17:40

So doubles are acting as an assignment operator?

Ответить
@javascriptmastery
@javascriptmastery - 24.01.2019 17:11

Great video as always!

Ответить