Javascript Boolean valueOf()

Introduction

The Javascript Boolean valueOf() method returns the primitive value of a Boolean object.

bool.valueOf()
x = new Boolean();//from   www  .  j av a  2 s  . c  om
let myVar = x.valueOf(); // assigns false to myVar
console.log(myVar);



PreviousNext

Related