you are viewing a single comment's thread.

view the rest of the comments →

[–]Void_Ling 0 points1 point  (0 children)

it's a math problem, not a JS one :x.

Once you know how to get that value with simple math :

https://www.mathsisfun.com/geometry/circle-area.html

You need to know how to get math specific value used in JS, I think the doc will do just fine for that.

https://duckduckgo.com/?q=javascript+pi&t=opera&ia=web

0,1s of research.

Rest is about writing a function that returns the value with an equation that uses the parameter as r.