Something that recently broke my code is that I naively thought that:
'+' in ['+','-',...] = true
.
The only problem is that it actually evaluates to false!
Someone please help me understand what is going on here!
Something that recently broke my code is that I naively thought that:
'+' in ['+','-',...] = true
.
The only problem is that it actually evaluates to false!
Someone please help me understand what is going on here!
The in operator returns true if the specified property is in the specified object or its prototype chain.
Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in