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 226 views
1 answer 169 views
1 answer 186 views
1 answer 211 views
1 answer 212 views
1 answer 210 views
...