0
Function in JavaScript
How do I prompt a user for the radius of a sphere and then create a function to calculate the circumference and volume of the sphere using a pi constant. Then display the result
3 odpowiedzi
+ 2
https://www.w3schools.com/jsref/met_win_prompt.asp
^Get radius.
https://www.w3schools.com/js/js_functions.asp
^Functions in JS.
https://formulas.tutorvista.com/math/sphere-formula.html
^Formulas for spheres.
https://www.w3schools.com/js/js_output.asp
^Display results.
The stuff above should help teach you all of the things you need to accomplish your task. Hope it helps and best of luck in your learning! :)
0
Yea it does. But do you know how I can use the square root function in my code?
0
Math.sqrt(x) gives the square root of x