Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAnas Mourad
14,817 PointsThe "!==" operator
First, I know that the "===" operator returns true when both operands have the same type and value, but its the first time to see the "!==" operator. What does it mean?
Second, why are we searching for "Content-Type" string only?. I know malicious inputs come in different forms.
And thanks in advance.
1 Answer
Christian Andersson
8,712 PointsIt's the direct opposite of ===
. So it returns true if the compared entities are not equal OR not of the same type.
Think of it as ==
compared to !=
. The exclamation mark negates.
Anas Mourad
14,817 PointsAnas Mourad
14,817 PointsThanks Christian for your help. Do you have any Idea why are we searching for string "Content-Type" only?
Patrick Cooney
12,216 PointsPatrick Cooney
12,216 PointsYou'll hear or see it referred to as a strict equals. Strict referring to the both the value and type matching as Christian stated.