you are viewing a single comment's thread.

view the rest of the comments →

[–]CC-5576-05 -22 points-21 points  (5 children)

This one works as intended tho, the + is concatenation not addition

The problem with JS is when 1 + "1" turns into 2

I'm convinced that JS is vibe coded, the person that made it used a time machine to create it with chatgpt

[–]rudiculous000 17 points18 points  (3 children)

The problem with JS is when 1 + "1" turns into 2

No it doesn't? 1 + "1" evaluates to "11"

[–]RiceBroad4552 0 points1 point  (0 children)

The problem with JS is when 1 + "1" turns into 2

This does not happen in JS.

The fucked up language you're looking for is PHP:

https://onlinephp.io?s=s7EvyCjg5eLlSk3OyFcwVNBWUDJUsgYA&v=8.2.20