If i use or operator with a decimal number the decimal points gets cut off from the output
console.log(2.5|0)
it prints 2
console.log(5|0)
it prints 5
console.log(1000.1|0)
it prints 1000
Why is that?
If i use or operator with a decimal number the decimal points gets cut off from the output
console.log(2.5|0)
it prints 2
console.log(5|0)
it prints 5
console.log(1000.1|0)
it prints 1000
Why is that?