The result is correct, but why is this error Cannot read property 'indexOf' of undefined?

<!DOCTYPE  HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript">

 //, infos
 var infos = new Array(
     ["A","",21,""],
     ["B","",23,""],
     ["C","",24,""],
     ["D","",21,""],
     ["E","",22,""],
     ["F","",21,""],
     ["G","",22,""],
     ["H","",20,""],
     ["I","",20,""],
     ["J","",20,""]
 );
 //
for(var i = 0;i<=infos.length;iPP) {
  if(infos[i].indexOf("")>0){
    if(infos[i].indexOf("")>0){
      document.write([i]+":"+infos[i]+"<br/>");
    }
  }
}
   console.log(infos[0].indexOf(""));
 //

</script>
</head>
<body>
</body>
</html>
but this is why Uncaught TypeError: Cannot read property "indexOf" of undefined at 4-10.html:23
Apr.14,2022

i <= infos.length - 1

change I < = infos.length to I < infos.length

Menu