New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Make root
how to make
2 Answers
+ 9
Math.sqrt(x);
+ 3
@chirag ghosh solution is for square root...
You can also calculate a n-based root by doing power of inverse => x^(1/n):
Math.pow(x,1/n);