Javascript IN operator compatibility
Posted
by jAndy
on Stack Overflow
See other posts from Stack Overflow
or by jAndy
Published on 2010-05-27T11:46:21Z
Indexed on
2010/05/27
11:51 UTC
Read the original article
Hit count: 242
Hi Folks,
Can someone tell me since which ECMA version the IN operator is available and which browsers (versions) support it ?
Explanation:
The IN-operator can be used like the following:
var myObject = {
Firstname: 'Foo',
Lastname: 'Bar'
};
if('Lastname' in myObject){
// Lastname is an attribute of myObject
}
© Stack Overflow or respective owner