ECMAScript-regrets
ECMAScript-regrets copied to clipboard
Non-intuitive if(!'property' in object)
!'property' in object is interpreted as (!'property') in object (=> false in object) which is not what people want the vast majority of the time.
Where writing this, people want to know if a property is not present in an object (!('property' in object))
I could definitely see having in bind tighter than !.
Thanks eslint http://eslint.org/docs/rules/no-unsafe-negation