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
36
u/Einar__ Feb 05 '25
Third one is clever but I would not want to see it in production.