Why console.log(typeof false === 'boolean'); returns true in javascript?

As I was learning about instance of an operator in JavaScript, I saw console.log(typeof false === ‘boolean’); returns true. I want to know why it returns true?

false is a Boolean value. Therefore, type of false is boolean.

you are right .Thanks a lot

1 Like

Some ()s may help.

Your condition is the same as

if ((typeof false) === boolean) 

The typeof false is boolean. Or, if you prefer, false is a boolean value.