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 217 views
1 answer 164 views
1 answer 179 views
1 answer 203 views
1 answer 204 views
1 answer 201 views
...