You can use `indexOf` instead of for loop