w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About

JavaScript POSITIVE_INFINITY Property


Number Object Reference JavaScript Number Object

Definition and Usage

The POSITIVE_INFINITY property represents infinity, returned on overflow.

Syntax

Number.POSITIVE_INFINITY;


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The POSITIVE_INFINITY property is supported in all major browsers.


Example

Example

Create overflow:

<script type="text/javascript">

var x=(Number.MAX_VALUE)*2;
if (x==Number.POSITIVE_INFINITY)
{
document.write(x);
}

</script>

The output of the code above will be:

Infinity

Try it yourself »


Number Object Reference JavaScript Number Object

DreamTemplate

WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Cheap UK Web Hosting
WEB BUILDING
XML Editor – Free Trial!
FREE Flash Website
FREE Web Templates
SEO Company
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
SHARE THIS PAGE