The only situation where == and === reacts unexpectedly is to compare a string string ( "123" ) with a constructed string ( new String("123") ), which will not give the first test.
However, in the second test, it falls because the constructed string is of type object , but the literal is of type string .
Based on this, I would say no, the third statement can never be achieved and is evaluated as true.
source share