The Javascript Boolean valueOf() method returns the primitive value of a Boolean object.
valueOf()
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);