It may not be obvious, but JavaScript coercions always result in one of the scalar primitive (seeChapter 2) values, likestring,number, orboolean. There is no coercion that results in a complex value likeobjector
In JavaScript, the equality operators (==and===) compare values for equality. However, they behave differently due to type coercion. The “==” (loose equality) operator performs type coercion, meaning it tries to convert operands to the same type before comparison: "10"==10;// true In ...