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
The key difference between type coercion and type conversion is that type conversion is always implicit whereas type conversion can either be implicit or explicit.
Copy file name to clipboardExpand all lines: 09-JavaScript-Operators.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,3 +242,5 @@ In the case of `0 in fruits`, it is checking whether the fruits array has a prop
242
242
However, "apple" in fruits is checking whether the fruits array has a property/key of "apple", which it does not, since the elements of the array are not considered keys. Therefore, the expression "apple" in fruits returns `false`.
243
243
244
244
To check if a value exists in an array, you can use the `includes()` method instead: `fruits.includes("apple")` would return `true` because the value "apple" exists in the array.
0 commit comments