Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Number.isFinite() function in JavaScript
The isFinite() function of the Number object accepts a number and determines if it is finite number. If the given number is finite it returns true else, it returns false.
Syntax
Its Syntax is as follows
Number.isFinite(100/0);
Example
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result1 = Math.min();
document.write(isFinite(result1));
document.write("<br>");
var result2 = Number.isFinite(100/0);
document.write(result2);
document.write("<br>");
var result3 = Math.max(25, 36, 862);
document.write(isFinite(result3));
document.write("<br>");
document.write(isFinite("Hello"));
</script>
</body>
</html>
Output
false false true false
Advertisements