JavaScript is Weird

  Рет қаралды 24,692

Philip Fabianek

Philip Fabianek

Күн бұрын

Пікірлер: 52
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Full explanations are available here: www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@juzarbharmal9998
@juzarbharmal9998 Жыл бұрын
type of NaN ('Not a Number') -> number: I laughed so hard on this.
@Garfield_Minecraft
@Garfield_Minecraft 2 ай бұрын
1:00 'fun'
@AniishAu
@AniishAu 2 жыл бұрын
what's a dev's favourite food? ToFoo. Where does he like to eat it? At a ToFoo Bar
@niksatan
@niksatan 2 жыл бұрын
What is Love? Javascript don't hurt me, don't hurt me, NaN
@minhnguyen-q1z7w
@minhnguyen-q1z7w 7 ай бұрын
as a person who dont code in Js, this f my brain up so hard
@venkatv3208
@venkatv3208 Жыл бұрын
It's not weird, it's just beautiful, looking forward for your explanation.
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Full explanations are available here: www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@venkatv3208
@venkatv3208 Жыл бұрын
@@PhilipFabianek thanks for the explanation
@habui4149
@habui4149 2 жыл бұрын
Subbed, love your style of content man
@lucas.contreras89
@lucas.contreras89 Жыл бұрын
First of all, nice video! and then, there're a couple that have explanation. For instance, ['1', '3', '11'].map(parseInt), the second argument of parseInt is in which base will take to do the conversion, I think by default is base 2 so 1 => 1, of course and 11 => 3, and finally, 3 in binary system does not exist that's why NaN. Another that I dare to explain is, 3 > 2 > 1 = false, (3 > 2) true (true is equal to 1) 1 > 1 (false) so true and false, false. It's quite confusing haha but understandable. See you! have a good day.
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Full explanations are available at www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@saadmehmood1992
@saadmehmood1992 2 жыл бұрын
JavaScript is weird. That is why I love it
@vickrammark2082
@vickrammark2082 2 жыл бұрын
JavaScript is weird 100% true but i love it 😁😁
@TajAlasfiyaa
@TajAlasfiyaa 2 жыл бұрын
Best Programming Content Maker
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
Not sure about that but thank you!
@Jolfgard
@Jolfgard Жыл бұрын
0:38 Wouldn't that one happen in most languages? For how I understand it, this statement checks if 1 is larger than 1.
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Not really, in JavaScript, this statement is equivalent to 1 > 1, but in Python this statement is actually equivalent to 3 > 2 and 2 > 1, which returns True
@sgmvideos5175
@sgmvideos5175 Жыл бұрын
what is weird on that object + x is not a number? .1 + .2 = .3000... not just in javascript, it's in any programming language that stores floating point number as 1.X * 2 ^ n typeof NaN (not a number) being a number might seem strange, but it's just part of the object, which other object should it be under? 3 > 2 > 1 also not weird, works like this: 3 > 2 returns true, that is equal to 1, 1 > 1 is false... that is weird just to bad programmers. typeof null being object is same as NaN, null is used when something should return object, but there is nothing to be returned 999... being 100... is the same thing as .1 + .2, javascript stores everything as double hence the moment number is too large, it has to round it the rest is the stuff I watched this for
@PhilipFabianek
@PhilipFabianek Жыл бұрын
You are of course correct, but you could argue this way for pretty much all things in this video. All of the explanations are available at www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@sgmvideos5175
@sgmvideos5175 Жыл бұрын
I was trying to point out mainly the stuff that is not just the javascript stuff, there are 3 main rules in JS that cause all the weird stuff - rule 1 is everything except undefined is object, rule 2 is javascript first tries to do operation on objects themself, if unsucessful, than try to cast, and than throw error, and rule 3 I forgot while I was writing this, but I know there was one more important thing to remember :D
@Dipenparmar12
@Dipenparmar12 2 жыл бұрын
I am curious 🧐?
@mr.duckie._.
@mr.duckie._. 8 ай бұрын
i would build a programming language where null + null = 1, but null * 2 = null
@hamzacasdasdasd
@hamzacasdasdasd 4 ай бұрын
alr budy 0.1+0.2 happens on any languange !
@jitu11
@jitu11 2 жыл бұрын
yes, sure
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
You can find the explanations at www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@alharethturab7612
@alharethturab7612 Жыл бұрын
Yes of course i would!!!
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Full explanations are available here: www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@andreymitrichev6552
@andreymitrichev6552 Жыл бұрын
javascript is confusing in mindustry: Groups.player.getByID().kick("reason",seconds*1000)
@maherkarot9129
@maherkarot9129 2 жыл бұрын
yes i want
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
The answers are available here: www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@AndrewTSq
@AndrewTSq 2 жыл бұрын
@@PhilipFabianek about "typeof null // 'object'", from my understanding is that all types in javascript is stored as 32bit values, and they use the last 3 bits to describe the type of the data. and NULL is 32 bits of zeros, which unfortunatly makes the last 3 bits all being zeros.. which is the same type that is used to say its an object. So its an old bug that still exists in JS
@ramshankarkumar4222
@ramshankarkumar4222 2 жыл бұрын
yes for sure!!!!!!!!!!!!!
@sharonye8297
@sharonye8297 6 ай бұрын
nope
@dxcqcv
@dxcqcv 2 жыл бұрын
Come on, tell me why
@PelpsRoxXx
@PelpsRoxXx 2 жыл бұрын
Ain't nothin' but a heartache
@excalibur2506
@excalibur2506 2 жыл бұрын
Yes.. Explain
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
You can find the explanations at www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@excalibur2506
@excalibur2506 2 жыл бұрын
@@PhilipFabianek thanks a lot
@amirrahnama8104
@amirrahnama8104 Жыл бұрын
yup!
@PhilipFabianek
@PhilipFabianek Жыл бұрын
Full explanations are available here: www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@VarunJain15
@VarunJain15 10 ай бұрын
JavaScript is Not Weird, there is a reason behind it.
@gnaneshnayak4592
@gnaneshnayak4592 11 ай бұрын
Yes❤
@kumarashutosh4080
@kumarashutosh4080 2 жыл бұрын
Yesss 😀
@jack19820814
@jack19820814 2 жыл бұрын
yes!!!
@PhilipFabianek
@PhilipFabianek 2 жыл бұрын
You can find the explanations at www.reddit.com/r/learnjavascript/comments/thuc7w/comment/i19vsmp/
@jcgamer1650
@jcgamer1650 2 жыл бұрын
I think NaN === NaN is false because you need to use strict types like NaN == NaN(JS is weird)
@AndrewTSq
@AndrewTSq 2 жыл бұрын
actually you need to use isNaN() function. Its not only javascript that does this. and why is it like this? According to IEEE 754 specifications any operation performed on NaN values should yield a false value or should raise an error.
@Serzes_
@Serzes_ Жыл бұрын
That's why Javascript was written in 10 days
@techhype3453
@techhype3453 2 жыл бұрын
yeah 😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂
@barnabasszabolcs8708
@barnabasszabolcs8708 2 жыл бұрын
LOL:)))))))
JavaScript Is Weird (EXTREME EDITION)
21:29
Low Byte Productions
Рет қаралды 689 М.
javascript is dumb
46:04
Theo - t3․gg
Рет қаралды 117 М.
Motorbike Smashes Into Porsche! 😱
00:15
Caters Clips
Рет қаралды 23 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 21 МЛН
How JavaScript Ruined the Web
15:02
Eric Murphy
Рет қаралды 118 М.
dotJS 2012 - Brian Leroux - WTFJS
18:27
dotconferences
Рет қаралды 190 М.
Befunge!
18:48
Truttle1
Рет қаралды 31 М.
How Does React Actually Work? React.js Deep Dive #1
15:25
Philip Fabianek
Рет қаралды 152 М.
Making My Own Programming Language and Coding a Game in It
10:19
AstroSam
Рет қаралды 1,3 МЛН
Looking Under the Hood of JavaScript
6:34
ThePrimeagen
Рет қаралды 187 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
I can’t believe they built this in React
16:08
Theo - t3․gg
Рет қаралды 128 М.
Learning JavaScript with WAT
9:37
Dylan Beattie
Рет қаралды 7 М.
What is React Suspense? (including Suspense for Data Fetching)
13:00
Philip Fabianek
Рет қаралды 19 М.