Javascript In

javascript

// JavaScript - The in operator:

2 in [1,2] is false.  

The in operator returns whether a particular property /
index available in the Object. In this case object has index 0 and 1 but 
don't have 2, therefore this expression return false.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License