fix js array membership check

Mrs Cake is incorrectly generating code to check if an array contains an element like the following:

```
state.index(["IL", "CA"]) >= 0
```

This changes it to produce correct code like the following:

```
["IL","CA"].indexOf(state) >= 0
```