-
Notifications
You must be signed in to change notification settings - Fork 6
Number Literals
Shane Brinkman-Davis Delamore edited this page Mar 29, 2018
·
2 revisions
All JavaScript ES6 (EcmaScript6) Number Literals are accepted:
1234567890
42Binary number syntax uses a leading zero, followed by a lowercase or uppercase Latin letter "B" (0b or 0B).
0b10000000000000000000000000000000 # 2147483648
0b01111111100000000000000000000000 # 2139095040
0B00000000011111111111111111111111 # 8388607Octal numbers are supported, by prefixing an octal number with "0o":
0o755 # 493
0o644 # 420Hexadecimal number syntax uses a leading zero, followed by a lowercase or uppercase Latin letter "X" (0x or 0X).
0xFFFFFFFFFFFFFFFFF # 295147905179352830000
0x123456789ABCDEF # 81985529216486900
0XA # 101E3 # 1000
2e6 # 2000000
0.1e2 # 10- Home
- Get Started
- Benefits
- Highlights
- Productivity by Design
- CaffeineScript Design
- What is CaffeineScript Good For?
- Get the most out of JavaScript
- Language Comparison
- CHANGELOG
- Blocks Instead of Brackets
- Binary Line-Starts
- Everything Returns a Value
- Streamlined Modules
- Scopes and Variables
- Optional Commas
- Semantics
- Ambiguities