Javascript is Bananas #javascript #programming

preview_player
Показать описание

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

typeof NaN
"number"

i love js

VictorMartins
Автор

That's the shit that got us TypeScript.

FrankJonen
Автор

NaN is a typeof number because in JS every number is a IEEE 754 standard (which almost every language has, for example C when you define a floating point, or Java, or Perl, or Python, or Rust).

A number is NaN when all exponent bits are 1 and all fraction bits are anything but 0 (as all 0 means Infinity which is also standarized in IEEE754), so NaN is a number type which its bits defines it as "not a number" xD

Llorx
Автор

I can see why everyone hates Javascript.

thp
Автор

Me (a python developer) watching Javascript content idk why
Edit : update little did i know what will happen one month later i am learning Javascript now lol specifically react 😅

KaramAlayan
Автор

Not even as bad as the truthiness/falsiness stuff. Like an empty string being falsy but an empty array being truthy. Just a painful language.

evanbelcher
Автор

Next lesson. What's the difference between:

let a = 0
let b = ++a
console.log(a, b)

versus

let a = 0
let b = a++
console.log(a, b)

The answer may surprise you.

Dylan_thebrand_slayer_Mulveiny
Автор

This so why string template literals are the only way to go, and we can handle the calculations in a separate function before we need to display the string equivalent

DEBO
Автор

One of the few things PHP got right was having separate sum and concatenate operators
...wow, I never tought I would say something good about PHP... this is so strange... lemme do this again... "arrays/maps being treated by default as values instead of references is awesome"... what a strange feeling

olhoTron
Автор

i see lots of people hate JavaScript just for this but i cant get them

you never really use the addition operator with both strings and numbers, so you barely even encounter this confusion while you're coding

captheobbyist
Автор

I, personally, like the Australian accent Banana more. It just sounds happier

Liubomyr_The_Great
Автор

"Interesting" is one word for it xD

NightUndead
Автор

Love that the subtitles are right over the code lol

letsjustgetjaked
Автор

What sound a sheep makes
JavaScript: baNaNa

Atkam.
Автор

to be perfectly honest i much prefer using + over parseFloat / parseInt for string to number convertion.

GottZ
Автор

Very good explanation of that one famous article that keeps making the rounds.

RS-fzps
Автор

Why did I laugh so hard at banana. Lo😂

Joe-twlh
Автор

Actually if you started with a number it will treat it as an arithmetic operation

razorxxxiv
Автор

Always use converter functions like Number("") instead of operators like instead of + in any language if you wanna work in a dev teams.

aminzarei
Автор

My favorite thing about js is that any number / 0 is infinity, not undefined. And the absolute best oart about it, is that technically it works, and it enrages hardcore math nerds so much.

nifegun
visit shbcf.ru