JavaScript Tutorial | Session-12 | Boolean and Number Object

Published: 01 January 1970
on channel: PDst Creates
489
25

In this video session you will can know one of the two javascript object boolean and number object.


Boolean Object


JavaScript Boolean is an object that represents value in two states: true or false. You can create the JavaScript Boolean object by Boolean() constructor as given below.
Boolean b=new Boolean(value);  
The default value of JavaScript Boolean object is false.


Number Object


The JavaScript number object enables you to represent a numeric value. It may be integer or floating-point. JavaScript number object follows IEEE standard to represent the floating-point numbers.
By the help of Number() constructor, you can create number object in JavaScript. For example:
var n=new Number(value);  
If value can't be converted to number, it returns NaN(Not a Number) that can be checked by isNaN() method.
You can direct assign a number to a variable also.


On this page of the site you can watch the video online JavaScript Tutorial | Session-12 | Boolean and Number Object with a duration of online in good quality, which was uploaded by the user PDst Creates 01 January 1970, share the link with friends and acquaintances, this video has already been watched 489 times on youtube and it was liked by 25 viewers. Enjoy your viewing!