How to calculate PI value with acos() function in JavaScript

1 Answer

0 votes
let pi = Math.acos(-1);
     
console.log("pi = " + pi);


 
/*
run:
   
pi = 3.141592653589793
     
*/

 



answered Mar 30, 2016 by avibootz
edited Apr 29, 2024 by avibootz

Related questions

2 answers 116 views
2 answers 120 views
2 answers 141 views
2 answers 135 views
2 answers 130 views
1 answer 134 views
1 answer 123 views
...