[Solved] How to make a string in javascript become incasesensitive?


This question definitely has some quality problems, but here is the solution:

let indexOfIgnoreCase = function(x, y) {
    return x.toLowerCase().indexOf(y.toLowerCase());
}

Are you still learning JavaScript? The first statement in your code already returns from the entire function, so you got a bunch of dead code.

solved How to make a string in javascript become incasesensitive?