How to calculate power for large numbers in JavaScript

1 Answer

0 votes
console.log(BigInt(2 ** 15));
console.log(BigInt(2 ** 100)); 



/*
run:

32768n
1267650600228229401496703205376n

*/

 



answered Aug 2, 2025 by avibootz

Related questions

1 answer 105 views
1 answer 78 views
1 answer 82 views
1 answer 100 views
1 answer 88 views
1 answer 95 views
...