there are many methods.
in operator
how to use?
for example:
attention: the attribute name should be string.
that is to say:
- a in dict ❎
- "a" in dict ✅
Object API: hasOwnProperty
The complete expression is
Object.prototype.hasOwnProperty().how to use it?
the same is the attribute key should be a string.
- a in dict ❎
- "a" in dict ✅
