Match string case sensitive value with array

Here is my code!!!
I have one input field And
One of the array
I’m matching Input field entered value with arrray’s list.
Prob : Unable to match capital value with array’s list.
e.g if user enter one10 value so this one should be match or if user enter ONE10 in capital letter then this value should be match too.

function myFunctiontwo(){
  var good = [
  var a = document.getElementById("code").value.split(' ');

  var foundPresent = a.some(elem => good.indexOf(elem) > -1);
  if(foundPresent === true){
  }else {
<!DOCTYPE html>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <script src=""></script>

    <input name="code" id="code" placeholder="code" required>
    <button id="submit" id="sumbit" onclick="myFunctiontwo()">GO</button>

92 thoughts on “Match string case sensitive value with array”