Why does new String('hello') === new String('hello') evaluate to False? [duplicate]
问题 This question already has an answer here: Which equals operator (== vs ===) should be used in JavaScript comparisons? 49 answers JavaScript comparison operators: Identity vs. Equality 4 answers Why does the following statement return false in JavaScript? new String('hello') === new String('hello') 回答1: Two String objects will always be unequal to each other. Note that JavaScript has string primitive values as well as a String constructor to create wrapper objects. All object equality