#wtfjs

Peter Krönersir_pepe
2025-12-02

Guess the output!

function * x(i = 0) {
  return yield * + i * i + [];
}

console.log("Result:", ...x());
Zuri (he/him) ❌️👑 🕐 CETshaedrich@mastodon.online
2025-07-19

I scored 13/28 on jsdate.wtf and all I got was this lousy text to share on social media.

But jokes aside, I had great fun—and quite a few headscratches, yaw drops, and sighs 😅

jsdate.wtf/

#amCoding #amProgramming #softwareDevelopment #softwareEngineering #webDevelopment #webDev #JS #JavaScript #ECMAScript #js_dates #wtfjs

Nouvelle-Techno.frnouvelletechno
2025-07-05

JavaScript : [] == ![] // → true 😱

Mais POURQUOI ?

➡️ Une vidéo pour comprendre cette folie : youtube.com/shorts/lHpTUW3gR00

2025-04-16

En #JavaScript, el operador == te dice que "0" == false es true.

🚩 Yo te digo que eso es una red flag con patas.

🧠 Mañana sale post nuevo explicando por qué.

#WTFJS

2024-11-11

Here's another #wtfJS moment. When {} is first, JS treats it as an empty code block! The + [] becomes numeric conversion of empty array `0`. But when [] is first, it's string concatenation

Zuri (he/him) ❌️👑 🕐 CETshaedrich@mastodon.online
2024-04-03

@brianleroux I kinda hoped, you would regret not having merged the #wtfjs PRs 😜 Nevertheless, enjoy your rocher espresso 😉

2023-09-21

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

Zuri (he/him) ❌️👑 🕐 CETshaedrich@mastodon.online
2023-07-28

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

שִׁמְעוֹן Ⓐ :polyamory_flag:express@chaos.social
2023-01-19

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.

youtube.com/watch?v=et8xNAc2ic

#WTFJS

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

> 0.1 + 0.2 === 0.3
false

> 0.1 + 0.2
0.30000000000000004
2022-02-01

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…

reddit.com/r/ProgrammerHumor/c

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
⚜ Ån̶t̶hiǝ¯₣ab̷r̷ε ⚜ ☮️antifarben
2020-01-01

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.

🐦🔗: twitter.com/ryuhhnn/status/121

Peter Krönersir_pepe
2017-05-02

Ratet mal was new RegExp(null) macht

Ratet mal was new RegExp(undefined) macht

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst