Possible spelling error

Possible spelling error


There is the challange: Comparison with the Strict Inequality Operator

Under “Instructions” section:
“Add the strict inequality operator to the if statement so the function will return “Not Equal” when val is not strictly equal to 17”

Should not that be:
“Add the strict inequality operator to the if statement so the function will return “Not Equal” when val is strictly not equal to 17”

I am not perfect in English, but this part just doesn’t sound right for me.


I feel like they are interchangeable, if I was speaking I would probably say not strictly equal rather than strictly not equal, but its really just a question of semantics.


While both sentences are valid English, they actually mean two different things. To understand the first, remember that JavaScript has two ways of testing equality, == and ===. Double equals == is a loose equality that performs type coercion.

// String vs integer
'1' == 1; true

Triple equals === is strict equality, meaning it does not coerce types.

// String vs integer
'1' === 1; false

“Strictly not equal to” sounds like it is the same, but the adverb ‘strictly’ is modifying a different part of the phrase. We can add parentheses to think of this in terms of function scope:

not (strictly equal to); "Not strictly equal, but could be a different type of equal"
strictly (not equal to); "Not equal at all, period"


I can definitely see the confusion.

“strictly equal” is the thing that they are not.

So 2 and “2” are “equal”, but they are not “strictly equal”.

“Strictly not equal” means that the restriction is on the “not”. (In all fairness, this would probably be perfectly well understood in context.)

TL;DR - It isn’t a typo. English is just awful.


@PortableStick @ArielLeslie I’m a native English speaker and I completely missed that distinction. I pictured it in my head as val1 !== val2 VS. !(val1 === val2). Ergo, my stating that they are the same. Apologies for any confusion.

And yes, English is awful.


No apology necessary. It’s not unusual at all.

As an aside, I have my degree in linguistics. Linguists strive to understand language as it’s spoken rather than how it “should” be, so it’s taboo to judge people for how they speak. There’s this unspoken rule, though, that every linguist gets their one pet peeve that they can rant about in private, and mine is exactly this sort of logical scoping problem. For instance, I sometimes hear “All things that glitter are not gold” or “All is not lost”. The error may seem obvious when it’s written, but people say this and my eye twitches a little bit.


@PortableStick is a cunning linguist.

I’ll see myself out.