This kind of thing is one of the reasons I could never start javascript, the things you can do with it are so wild that it's very difficult to reason about the code, there aren't a lot "guarantees" that you can have, you have to reason about everything at the same time because you can't really rely on the compiler and types (basically your mind is the compiler).
2
u/NottingHillNapolean 1d ago
The first time seeing a javascript variable given a new value and type in the same scope, my first thought was, "This is unnatural..."