The strict equality operator === checks to see if two values are equal and of the same type.
A comparison expression always evaluates to a boolean.
From the MDN entry: The non-identity operator returns true if the operands are not equal and/or not of the same type.
Note: In some examples around the web you may see a double-equals-sign ==, used for comparison instead. This is the non-strict equality operator in Javascript. This will convert the two values being compared to the same type before comparing them.
示例
相关参考
stringify
From the MDN entry: The JSON.stringify() method converts a JavaScript object or value to a JSON string.
log
Prints a message to your browser's web console.
===
The strict equality operator === checks to see if two values are equal and of the same type.
console
Prints a message to the web browser's console.