DEV Community

Discussion on: How to make Infinity!

Collapse
_bkeren profile image
''

parseInt(${"9".repeat(304)}) returns a number , parseInt(${"9".repeat(305)}) returns Infinity

Collapse
mafee6 profile image
MAFEE7 Author

Cuz that's where the number exits the limit
Hence infinity

Collapse
_bkeren profile image
''

but that's interesting, because 304 is not power of 2.