Languages are what they are, and if you&#x27;re going to use one you might as well use it idiomatically. Maybe it&#x27;s just me, but I see  &quot;|0&quot; all the time in JS, not as some kind of crazy performance hack, but used idiomatically to mean &quot;truncate&quot;.<p>And on the flip side with JS&#x27;s lack of number types, any code that looks like it&#x27;s doing type casts (rather than math) looks out of place. If one must mess around with JS number types then all you can really do is give hints to the optimizing compiler, in which case &quot;|0&quot; is the standard way to hint that you want a small int.<p>Obviously what looks clean is a matter of opinion, but FWIW.