From 0f276bf03a1e761756b6966f30b53c2f5dda0e8d Mon Sep 17 00:00:00 2001 From: G30RG35 <68205405+G30RG35@users.noreply.github.com> Date: Thu, 25 Jul 2024 02:11:36 -0600 Subject: [PATCH] Update Js Roadmap Strict Equality Operator === (#6220) * Update Js Roadmap Strict Equality Operator === Update @lJwcc6JoUIQoiQ6FkV2KW.md * Update src/data/roadmaps/javascript/content/@lJwcc6JoUIQoiQ6FkV2KW.md --------- Co-authored-by: dsh --- .../javascript/content/@lJwcc6JoUIQoiQ6FkV2KW.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/data/roadmaps/javascript/content/@lJwcc6JoUIQoiQ6FkV2KW.md b/src/data/roadmaps/javascript/content/@lJwcc6JoUIQoiQ6FkV2KW.md index da090196c..7d66e13e9 100644 --- a/src/data/roadmaps/javascript/content/@lJwcc6JoUIQoiQ6FkV2KW.md +++ b/src/data/roadmaps/javascript/content/@lJwcc6JoUIQoiQ6FkV2KW.md @@ -1 +1,14 @@ -# === \ No newline at end of file +# Strict Equality Operator (===) +In JavaScript, the strict equality operator `===` compares both the value and the type of two operands. This means that it will only return true if both the value and the type are identical. +```sh +"5" === "5" // true +``` +In this case, both the value and the type are the same, so the result is true. +```sh +"5" === 5 // false +``` +Here, although the values might appear similar, the types are different (string and number), so the result is false. The strict equality operator does not perform type coercion; both the value and the type must be identical. + +Learn more from the following resources: + +- [@article@Strict equality - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality)