10.07.2017 Views

javascript_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Javascript<br />

Property Value is : 0.4342944819032518<br />

Math-PI<br />

It returns the ratio of the circumference of a circle to its diameter which is<br />

approximately 3.14159.<br />

Syntax<br />

Its syntax is as follows:<br />

Math.PI<br />

Example<br />

Try the following example program.<br />

<br />

<br />

JavaScript Math PI Property<br />

<br />

<br />

<br />

var property_value = Math.PI<br />

document.write("Property Value is : " + property_value);<br />

<br />

<br />

<br />

Output<br />

Property Value is : 3.141592653589793<br />

Math-SQRT1_2<br />

It returns the square root of 1/2; equivalently, 1 over the square root of 2 which<br />

is approximately 0.707.<br />

280

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!