Possible Duplicate:
How do I check to see if an object has an attribute in Javascript?
I have a Javascript object defined as following:
var mmap = new Object();
mmap['Q'] = 1;
mmap['Z'] = 0;
mmap['L'] = 7;
...
How to check whether this map has a value for a given key (for example 'X')? Does .hasOwnProperty()
get into play?