Javascript computed with number by number .MAX_VALUE

I am writing a small script that calculates very large numbers:

for (var i = 1; i<=256; i++) {
    var add = Math.pow(102, i);
    output += add;
    console.log(add);
}

the value addreaches infinity in the 153rd iteration of the loop. now the value in Math.powcan change, and I need the right conclusion (and not infinity). is there any trick or w that could help me? thank

+3
source share

All Articles