Question: I've tried to build <https://github.com/DEVSENSE/Phalanger>, but after the build process it shows build errors. I tried VS 2015, maybe there it just a question of a wrong version?

[![screenshot](https://i.stack.imgur.com/Q6qXv.png)](https://i.stack.imgur.com/Q6qXv.png)

Answer: 
> 
> The [**in operator**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in) returns true if the specified property is in the
>  specified object.
> 
> 
> 

Using `in` operator for an array checks of the `indices` and the `length` property - because those are the properties for an array:

```js
console.log(Object.getOwnPropertyNames([1, 2, 3]));
console.log(Object.keys([1, 2, 3]));
console.log('length' in [1, 2, 3]);
```

`Object.keys` : return all enumerable properties

`Object.getOwnPropertyNames` : return all properties
Try this

```
var test = 2;
var arrval= [1, 5, 2, 4];
var a = arrval.indexOf(test);
if(a>-1) console.log("Having");
else console.log("Not Having");

```