javascript n root of a number code example Example: javascript nth root var root = 3; var number = 27; var answer = Math.pow(number, 1 / root); // 3