+ 1
How can i find nth root of number in js.
For expl 4th root of 16 is 2 how can find this in using js
2 Antworten
+ 3
You can get the power by using **.
2**4 // 16
3**3 // 27
You use the same operator for the other direction, roots:
16**(1/4) // 2
27**(1/3) // 3
+ 3
<your-number>**(1/<nth-root>)
Math.pow(<your-number>, (1/<nth-root>))