How can i find nth root of number in js. | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 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

11th May 2020, 11:13 AM
Abbakar_ah!!!
Abbakar_ah!!! - avatar
2 Respuestas
+ 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
11th May 2020, 11:21 AM
HonFu
HonFu - avatar
+ 3
<your-number>**(1/<nth-root>) Math.pow(<your-number>, (1/<nth-root>))
11th May 2020, 11:23 AM
deeyae
deeyae - avatar