Programming Tips - javaScript: all numbers are floats so how to use a integer?
Date: 2024jan18
Language: javaScriptQ. javaScript: all numbers are floats so how to use a integer?
A. If you create a variable with `var` or `let` it will be a float
- unless you use the `n` suffix!
let n = 444444444444444n; // its a big integer
You can count for days:
for (let i = 0n;; i += 100000n) {
console.log(i);
}