Javascript is At It Again!
Back in my day we used to call it Java, now the kids are all about the Javascript.
I can't believe I'm doing this many posts on JavaScript. But here it is:
![](https://lucas-schiavini.com/content/images/2023/02/image-1.png)
I hope you cry yourself to sleep thinking about this.
![](https://lucas-schiavini.com/content/images/2023/02/image-2.png)
This is a cryptic one I admit, why would we get such a weird number when we do `a | 0`? It's because JavaScript interprets a to be a SIGNED 32-bit Float number when we do bitwise operations with it.
What about some easier test cases?
![](https://lucas-schiavini.com/content/images/2023/02/Screenshot-2023-02-10-at-6.25.03-PM.png)
What about numbers?
![](https://lucas-schiavini.com/content/images/2023/02/Screenshot-2023-02-10-at-6.25.22-PM.png)
I wonder why haven't we given up JavaScript at this point. We should just go back to punched tapes.
![](https://lucas-schiavini.com/content/images/2023/09/image.png)
The young people today don't know how good programming was back in the day.
😗 Enjoy my writing?
If you read more than 2 of my posts and loved them, we have an honor code, meaning I give you value and you hit that subscribe button.
Forward to a friend and let them know where they can subscribe (hint: it’s here).
Join an Exclusive Tech Friendly Community! Connect with like-minded people who are interested in tech, design, startups, and growing online — apply here.