JavaScript
JavaScript used the in operator on a non-object value
JavaScript rejected the in operator because the right-hand side is not an object that can be searched for properties.
JavaScript
JavaScript rejected the in operator because the right-hand side is not an object that can be searched for properties.
Observed message
TypeError: cannot use 'in' operator to search for 'x' in 'y'
Why it happens
How to fix it
Official reference
MDN: TypeError: cannot use in operator to search for x in yRelated errors
Explore more