Javascript examples for Operator:in
The in operator returns true if the specified property is in the specified object, otherwise false:
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var cars = ["A","B","C"]; document.getElementById("demo").innerHTML = (cars instanceof Array) + "<br>" + (cars instanceof Object) + "<br>" + (cars instanceof String) + "<br>" + (cars instanceof Number);//from ww w .j a v a2 s .c o m </script> </body> </html>