Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

The JavaScript FAQ
Prev Home Next

Constants

Question: What types of numbers can I use in JavaScript code?

Answer: In JavaScript code, you can use the following forms of numbers:

  • conventional decimal numbers:
    5 137 1.3
  • decimal numbers in exponential form:
    6.67e-11
    -1.127e20
  • octal numbers, for example:
    01234 -077 0312
    Positive octal numbers must begin with 0 (zero) and negative octal numbers must begin with -0.
  • hexadecimal numbers, for example:
    0xFF -0xCCFF 0xabcdef
    Positive hexadecimals must begin with 0x and negative hexadecimals must begin with -0x.

JavaScripter.net. Copyright © 1999-2006, Alexei Kourbatov

The JavaScript FAQ
Prev Home Next


 
 
  Mirrored with kind permission of Alexei Kourbatov Design by Interspire