Solution for Rosetta Code: I before E except after C

What is your hint or solution suggestion?

String.indexOf returns the first index where an input string matches a given string. If the input string is not found, -1 is returned.

Solution 1
function IBeforeExceptC(word) {
    var n = word.indexOf("cei");
    return (n<0 ? false:true);

Challenge: I before E except after C

Link to the challenge: