Sunday, September 26, 2021

JavaScript- Understanding Numbers

Below table will help you to understand the values representable with number data type

Statement i typeof(i) Remarks
i = 0 0 number Fixed point number
i = 1.0 1 number Floating point number with Zero
i = 1.2 1.2 number Floating point number
i = 1.2e3 1200 number Scientific Notation
i = 1.2e200 1.2e+200 number Scientific Notation
i = 1 / 0 Infinity number Divide by Zero
i = NaN NaN number Not a Number
i = 1234567890123456 1234567890123456 number Precise with 15 digit
i = 12345678901234567 12345678901234568 number Precision is lost
i = 1.2e20000 Infinity number Value cannot be represented with number
i = Number.MIN_VALUE 5e-324 number Minimum Value for supported by number data type
i = Number.MAX_VALUE 1.7976931348623157e+308 number Maximum Value for supported by number data type

1 comment:

  1. the king casino - CommunityKahabar
    the king casino. 1. 3.3M members 카지노 in the community. · 2.4M members in the community. · 3.3M followers in the 더킹카지노 community. · 4.6M followers in the community. happyluke

    ReplyDelete