简体   繁体   中英

How to make a cube root calculator in dashcode

有人可以将javascript发布到dashcode中的多维数据集根

I don't know what Dashcode is, but assuming it uses standard JavaScript, just turn it into a power calculation (like you learned at school) and use Math.pow :

> Math.pow(27, 1/3)
  9

The nth root of x is x^(1/n).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM