10.02.2018 Views

js_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

var value = Math.atan2(+Infinity, -Infinity);<br />

document.write("Fourth Test Value : " + value );<br />

<br />

<br />

<br />

Output<br />

First Test Value : 1.4056476493802699<br />

Second Test Value : 0.16514867741462683<br />

Third Test Value : 3.141592653589793<br />

Fourth Test Value : 2.356194490192345<br />

ceil ( )<br />

This method returns the smallest integer greater than or equal to a number.<br />

Syntax<br />

Its syntax is as follows:<br />

Math.ceil ( x ) ;<br />

Parameter Details<br />

x: a number.<br />

Return Value<br />

Returns the smallest integer greater than or equal to a number.<br />

Example<br />

Try the following example program.<br />

<br />

<br />

JavaScript Math ceil() Method<br />

<br />

<br />

<br />

290

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

Saved successfully!

Ooh no, something went wrong!