Skip to content
Subhajit Sahu edited this page Aug 1, 2022 · 15 revisions

Finds power-of-10.

Alternatives: pow2, pow10.
Similar: log2, pow2, isPow2, nextPow2, prevPow2.


pow10(x)
// x: an int32

const xinteger = require('extra-integer');


xinteger.pow10(4);
// → 10000

xinteger.pow10(2);
// → 100

xinteger.pow10(0);
// → 1


References

Clone this wiki locally