Javascript examples for Object:Object Literal
Check whether a Javascript object has a value for a given key
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> var mmap = new Object(); mmap['Q'] = 1;//from w ww . j a v a 2 s . co m mmap['Z'] = 0; mmap['L'] = 7; console.log(mmap['Z'] === undefined); console.log(mmap['X'] === undefined); </script> </head> <body> </body> </html>