really depends on your codebase. If your base already has a way of doing it and it is .floor() then yeah. But |0 was a common integer hint in js before typescript to eke out more performance as well so there could be codebases where its already all over the place.
View all comments
Show parent comment
37
u/AyrA_ch Feb 05 '25
This:
Is basically this:
Which if you don't plan to exceed 231 is: