Skip to content
Subhajit Sahu edited this page Aug 9, 2022 · 2 revisions

Find the nth root of a number (ⁿ√).


function root(x, n)
// x: a number
// n: root

const xnumber = require('extra-number');


xnumber.root(25, 2);
// → 5

xnumber.root(-8, 3);
// → -2


References

Clone this wiki locally