JavaScript Tutorial | Session-12 | Boolean and Number Object

Pubblicato il: 01 gennaio 1970
sul canale di: 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.


In questa pagina del sito puoi guardare il video online JavaScript Tutorial | Session-12 | Boolean and Number Object della durata di online in buona qualità , che l'utente ha caricato PDst Creates 01 gennaio 1970, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 489 volte e gli è piaciuto 25 spettatori. Buona visione!