How I rediscovered my love for JavaScript after throwing 90% of it in the trash.
Joel Thoms
2.7K66

Great article! Js is really a hell in the OOP world.

In the `switch case` section, what do you think of just using json?

const mySwitch = { 0: “water freeze”, 50: “hot for shower”, 100: “coffee time” }

And the you could execute `mySwitch[x]`.

At clojure, everything is a function, even a map (json), so the syntax is clearer for this example.

Show your support

Clapping shows how much you appreciated Itai Edri’s story.