It should be noted that ~~ is not the same as Math.floor - it simply removes the decimal part, and is consistently faster at doing so than Math.trunc - which is the normal suggested 'readable' way of doing so (at least in my tests - sometimes up to 50% faster):
absolutely, very important in some situations, completely irrelevant in many others.
and also agree on the subjectivity of readability. but still prefer to read Math.floor than ~~
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It should be noted that
~~is not the same asMath.floor- it simply removes the decimal part, and is consistently faster at doing so thanMath.trunc- which is the normal suggested 'readable' way of doing so (at least in my tests - sometimes up to 50% faster):It should also be remembered that performance is very important in some situations, and also that readability is purely subjective.
absolutely, very important in some situations, completely irrelevant in many others.
and also agree on the subjectivity of readability. but still prefer to read Math.floor than ~~