You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is one of multiple instances of the 'bitwise and' operator being used where the 'logical and' operator should have been used.
bitwise AND: &
logical AND: &&
Logical AND (&&) takes the expression before it and the expression after it (both expressions should be booleans), combining to a larger expression that evaluates to a boolean. This boolean is true if both expressions fed to it are true. Since the two expressions fed to it use comparative operators (==, !=) they evaluate to booleans.
Bitwise AND is not evaluating the total expression to a boolean, but a number that happens to be truthy, so the code is working for the wrong reason.
The text was updated successfully, but these errors were encountered:
spellcheck/assets/scripts/practice.js
Line 130 in 340c2c4
This is one of multiple instances of the 'bitwise and' operator being used where the 'logical and' operator should have been used.
bitwise AND: &
logical AND: &&
Logical AND (&&) takes the expression before it and the expression after it (both expressions should be booleans), combining to a larger expression that evaluates to a boolean. This boolean is true if both expressions fed to it are true. Since the two expressions fed to it use comparative operators (==, !=) they evaluate to booleans.
Bitwise AND is not evaluating the total expression to a boolean, but a number that happens to be truthy, so the code is working for the wrong reason.
The text was updated successfully, but these errors were encountered: