Masthash

#wtfjs

Brian LeRoux 💚
3 months ago

@ryan @ak 💀 lots of valuable #wtfjs fodder being mined by Ryan here for sure

Zuri
4 months ago

@brianleroux Apart from occasional #wtfjs moments it gets better and better with every #ECMAScript version

If you haven't seen these #Javascript #Quirks yet, it's worth it. Don't forget some popcorn and tissues, though. You might cry from laughing.

https://www.youtube.com/watch?v=et8xNAc2ic8

#WTFJS

> .1 + .2 === .3
Invalid REPL keyword
undefined

> 0.1 + 0.2 === 0.3
false

> 0.1 + 0.2
0.30000000000000004
Cegorach
2 years ago

War die letzten Jahre immer so drauf "Hahaha, klar ist #JavaScript scheiße und für Zahlenoperationen überhaupt nicht verwendbar, aber zumindest weiß ich WARUM es scheiße ist"

Heute sah ich eine neue #WTFJS-Sache, die ich bisher noch nicht kannte…

https://www.reddit.com/r/ProgrammerHumor/comments/shmec9/we_all_love_javascript/

Aua.

-> parseInt(0.5)
<- 0
-> parseInt(0.05)
<- 0
-> parseInt(0.005)
<- 0
-> parseInt(0.0005)
<- 0
-> parseInt(0.00005)
<- 0
-> parseInt(0.000005)
<- 0
-> parseInt(0.0000005)
<- 5

RT @ryuhhnn@twitter.com

Any JavaScript nerds wanna get rekt? This code:

$=_=>`$=${$};$()`;$()

is valid ES6 that will print itself. Seriously. Copy and paste this into your console and try it out if you don't believe me. #JavaScript #ECMA #ES6 #WTFJS

🐦🔗: https://twitter.com/ryuhhnn/status/1212075258548834305

Peter Kröner
7 years ago

Ratet mal was new RegExp(null) macht

Ratet mal was new RegExp(undefined) macht

#wtfjs