0

when I use ~ before any number it gives output as -ve value but why extra -1? Example :

alert(~0) output = -1
alert(~1) output = -2
alert(~3) output = -4
alert(~4) output = -5
alert(~5) output = -6

any one, please share your views.

Bhanu Pratap
  • 1,225
  • 12
  • 14

0 Answers0