42 / 2
is 21 of course
42 / 5
is 8.4, not 8
in javascript /
operator no discard the decimal point.
you should use Math.round(), Math.ceil() or Math.floor()
Math.round(42 / 5) // 8
42 / 2
is 21 of course
42 / 5
is 8.4, not 8
in javascript /
operator no discard the decimal point.
you should use Math.round(), Math.ceil() or Math.floor()
Math.round(42 / 5) // 8
For further actions, you may consider blocking this person and/or reporting abuse
enyie -
Abhay Singh Kathayat -
0xSaad -
Abhay Singh Kathayat -
Top comments (0)