Question: Beyond the improved readability, is there any advantage to `includes` over `indexOf`? They seem identical to me.

What is the difference between this

```
var x = [1,2,3].indexOf(1) > -1; //true

```

And this? 

```
var y = [1,2,3].includes(1); //true

```

Answer: 
`indexOf()` and `includes()` can both be used to find elements in an array, however each function yields different return values.

`indexOf` returns a number (`-1` if element not present in the array, or array position if the element is present).

`includes()` returns a boolean value (`true` or `false`).
Internet explorer does not support includes, if that helps you decide.

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes#Browser_compatibility>