⚖️(~~) vs. Math.trunc()
xJS ⟩ statement ⟩ expression ⟩ operator ⟩ double tilde (~~)
~~ vs. Math.trunc():the difference
will try to convert x with "prefer-number" conversion, if it's NaN, the result remains NaN.
has wider range. (see example above)
Last updated