root of any number javascript

JavaScript
let n = 64;
let root = 6;
Math.pow(n, 1/root);
//output 2;let n = 64;
let root = 6;
Math.pow(n, 1/root);
// output 2;let n = 64;
let root = 5;
Math.pow(n, 1/root);
// output 2;
Source

Also in JavaScript: