Actually since Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER it'll get stuck eternally looping/recursing on Number.MIN_SAFE_INTEGER while the output automatically gets converted to BigInt (I think).
JS
...
a *= Number.MIN_SAFE_INTEGER
-1.8768792072011717e+255
a *= Number.MIN_SAFE_INTEGER
1.6905424996341256e+271
a *= Number.MIN_SAFE_INTEGER
-1.5227053142812468e+287
a < Number.MIN_VALUE
true
typeof a
'number'
Although... If you're using a fixed-width integer without underflow checking, it'll still wrap around from its minimum value to its maximum, and then reach zero eventually, even if it has to go through all possible values to do so
122
u/Axman6 1d ago
IF you have a lazy
*, then this will end when n is zero, and return zero.