Javascript Numeric Variable Type Integer

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/javascript-numeric-variable-type-integer/
PINTEREST
PINTEREST
INSTAGRAM

Number types are used to express countable data. Numbers will presents integer, floating-point and dates. From technical point there is no difference between integer and floating-point.

Numbers can be defined explicitly like below.

  • var count creates and variable
  • new Number(12) makes variable type number and set value 12 to it

Numbers have low and high limits. We can them MAX_VALUE which is 1.7976931348623157E+308 and MIN_VALUE 5E-324 .

NaN means Not a Number and used for non number types.

Get Value of Number

To get primitive value of a number valueOf function can be used.

Code:

Output:

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/javascript-numeric-variable-type-integer/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  C Numeric Variable Types Integer, Long, Float

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)