const a = false; const z = ‘false’; console.log(a === z); [closed]

The reason const a = false; const z = ‘false’; console.log(a === z); gives false is that the strict equality operator (===) checks both value and datatype. In this case, a is a boolean with the value false, while z is a string with the value ‘false’. Since their datatypes (boolean and string) do not match, the result is false. Even though both appear to represent “false,” their types differ, which makes the comparison fail. Hence, strict equality returns false when comparing them.