Horje
5.1.2. Boolean Conversion¶ Code Example
5.1.2. Boolean Conversion¶
/*As with the number and string data types, the boolean type also has 
a conversion function, Boolean. It works similarly to the Number and 
String functions, attempting to convert a non-boolean value to a 
boolean.*/

console.log(Boolean("true"));  //true
console.log(Boolean("TRUE"));  //true
console.log(Boolean(0));  //false
console.log(Boolean(1));  //true
console.log(Boolean(''));  //false
console.log(Boolean('LaunchCode'));  //true 




Javascript

Related
récupérer avatar discord bot Code Example récupérer avatar discord bot Code Example
length of set javascript Code Example length of set javascript Code Example
how to apply multiple attributes using js Code Example how to apply multiple attributes using js Code Example
react date component with word month Code Example react date component with word month Code Example
Remove a class when the backspace-key is pressed inside the input field Code Example Remove a class when the backspace-key is pressed inside the input field Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10