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 first checks for an index, or if property of an object exists,

```
console.log(test in [1,2,3]);

```

and not for a value in the array, as the second is doing.

```
console.log([1,2,3].indexOf(test) != -1);

```
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");

```