JavaScript Context Dependent Semantics: p in o
In JavaScript, you have these syntax:
p in o- check if property exist. [see JS: βinβ operator π]
for (p in o) {β¦}- enumerate properties. [see JS: for-in Loop π]
Both contains
p in o,
but their meaning is very different.
In other words, the in operator has context dependent semantics.