The result of a call to String#toUpperCase
should only be compared with an uppercase string.
Calls like s.toUpperCase() === "Not-Uppercase"
will always evaluate to false
.
Similarly, calls to toLowerCase
should only be compared with lowercase strings.
if (str.toLowerCase() === 'InJuly') {
// ...
}
if (str.toLowerCase() === 'injuly') {
// ...
}