Found 6710 Articles for Javascript

Number.parseFloat() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 12:48:30

72 Views

The parseFloat() function of the Number object accepts a string, parses and returns floating point number represented by it.SyntaxIts Syntax is as followsNumber.parseFloat("32.01");Example Live Demo    JavaScript Example           var result = Number.parseFloat("32.01");       document.write(result);     Output32.01

Number.isSafeInteger() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:49:17

93 Views

The isSafeInteger() function of the Number object accepts a number and determines if it is safe integer. If the given number is a safe integer it returns true else, it returns false.SyntaxIts Syntax is as followsNumber.isSafeInteger(90071991);Example Live Demo    JavaScript Example           var result = Number.isSafeInteger(90071991);       if(result) {          document.write("Given number is a safe integer");       }else {          document.write("Given number is not a safe integer");       }     OutputGiven number is a safe integerExamplePassing Decimal value, negative value ... Read More

Number.isInteger() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 12:40:01

82 Views

The isInteger() 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.SyntaxIts Syntax is as followsNumber.isInteger(100/0);Example Live Demo    JavaScript Example           var result = Number.isFinite(100/0);       if(result) {          document.write("Given number is finite");       }else {          document.write("Given number is infinite");       }     OutputGiven number is infiniteExampleIn addition to equation you can also pass positive number, negative number, zero and ... Read More

Number.isFinite() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:40:36

81 Views

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.SyntaxIts Syntax is as followsNumber.isFinite(100/0);Example Live Demo    JavaScript Example           var result1 = Math.min();       document.write(isFinite(result1));       document.write("");       var result2 = Number.isFinite(100/0);       document.write(result2);       document.write("");       var result3 = Math.max(25, 36, 862);       document.write(isFinite(result3));       document.write("");       document.write(isFinite("Hello"));     Outputfalse false true false

Number.MIN_SAFE_INTEGER Property in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:42:30

103 Views

The Number.MIN_SAFE_INTEGER property of the Number object represents the minimum safe integer in JavaScript (i.e. –(253 – 1)).SyntaxIts Syntax is as followsNumber.MIN_SAFE_INTEGERExample Live Demo    JavaScript Example           var result = Number.MIN_SAFE_INTEGER;       document.write("Minimum safe integer: " + result);     OutputMinimum safe integer: -9007199254740991

Number.MAX_SAFE_INTEGER Property in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:43:22

138 Views

The Number.MAX_SAFE_INTEGER property of the Number object represents the maximum safe integer in JavaScript (i.e. 253 - 1).SyntaxIts Syntax is as followsNumber.MAX_SAFE_INTEGERExample Live Demo    JavaScript Example           var result = Number.MAX_SAFE_INTEGER;       document.write("Maximum safe integer: " + result);     OutputMaximum safe integer: 9007199254740991

Number.EPSILON Property in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 12:43:46

168 Views

The Number.EPSILON property of the Number object represents the difference between 1 and the smallest floating point number greater than 1.SyntaxIts Syntax is as followsNumber.EPSILONExample Live Demo    JavaScript Example           var result = Number.EPSILON;       document.write("Value of the epsilon : " + result);     OutputValue of the epsilon: 2.220446049250313e-16

Math.tanh() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:44:07

63 Views

The tanh() function of the Math object accepts an angle (in radians) and returns its hyperbolic tangent value.SyntaxIts Syntax is as followsMath.tanh(90)Example Live Demo    JavaScript Example           var result = Math.tanh(90);       document.write("Hyperbolic tangent value of the given angle: "+result);     OutputHyperbolic tangent value of the given angle: 1

Math.sinh() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:34:10

79 Views

The sinh() function of the Math object accepts an angle (in radians) and returns its hyperbolic sine value.SyntaxIts Syntax is as followsMath.sinh(90)Example Live Demo    JavaScript Example           var result = Math.sinh(90);       document.write("Hyperbolic sine value of the given angle: "+result);     OutputHyperbolic sine value of the given angle: 6.102016471589204e+38

Math.cosh() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:35:37

63 Views

The cosh() function of the Math object accepts an angle (in radians) and returns its hyperbolic cosine value.SyntaxIts Syntax is as followsMath.cosh(90)Example Live Demo    JavaScript Example           var result = Math.cosh(90);       document.write("Hyperbolic cosine value of the given angle: "+result);     OutputHyperbolic cosine value of the given angle: 6.102016471589204e+38

Advertisements