I have a string and I want to execute `if` statement if string value matches given set of words(say ape,eat,sleep,mango........)

I can do:-

```
if(name=="ape" || name=="eat".............)

```

Is there any easier method to do this?

I want to use if-else ONLY.