You have to loop from 0 to i < colCount. In JavaScript, and many other language, the indexing starts from zero.

Look:

Loop through an array in JavaScript

Answer from mico on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › undefined
undefined - JavaScript - MDN Web Docs - Mozilla
The undefined global property represents the primitive value undefined. It is one of JavaScript's primitive types.
🌐
Coderanch
coderanch.com › t › 503440 › languages › org-mozilla-javascript-undefined-error
org.mozilla.javascript.undefined error (HTML Pages with CSS and JavaScript forum at Coderanch)
<category> <pattern>WHAT IS YOUR WEBSITE</pattern> <template> It is at "http://www.mywebsite.org" <script language="JavaScript"> function Popup(){ var winURL = "http://www.mywebsite.org/"; var winWidth=800; var winHeight=600; var winScrollbars="yes"; var winToolbar="yes"; var winSizeable="yes"; var winLocation="yes"; var winDirectories="yes"; var winStatus="yes"; var winMenubar="yes"; var winCopyHistory="yes"; newWin=window.open(winURL,"", "copyhistory="+winCopyHistory+ ",menubar="+winMenubar+ ",status="+winStatus+ ",directories="+winDirectories+ ",location="+winLocation+ ",resizable="+winSizeable+ ",toolbar="+winToolbar+ ",scrollbars="+winScrollbars+ ",height="+winHeight+ ",width="+winWidth); } </script> Go to my website! <script language="JavaScript"> Popup(); </script> </template> </category>
🌐
Mozilla Support
support.mozilla.org › en-US › questions › 930252
Javascript Application error: TypeError: text is undefined | Firefox Support Forum | Mozilla Support
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes). *Don't make any changes on the Safe mode start window. *https://support.mozilla.org/kb/Safe+Mode If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Errors › No_properties
TypeError: null/undefined has no properties - JavaScript | MDN
The JavaScript exception "null (or undefined) has no properties" occurs when you attempt to access properties of null and undefined. They don't have any.
🌐
Mozilla Support
support.mozilla.org › en-US › questions › 1061097
Developers console saying function is "undefined" but the ...
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Glossary › Undefined
Undefined - Glossary | MDN
let x; // create a variable but assign it no value console.log(`x's value is ${x}`); // logs "x's value is undefined"
🌐
Mozilla Support
support.mozilla.org › en-US › questions › 751899
My javascript is not working on Firefox | Firefox Support Forum | Mozilla Support
Numerous web sites, even Google, become unusable due to JavaScript errors. The problem can be fixed by clearing the cache. I also noticed that some images for certain pages did not load until the cache was cleared, so I suspect this is not a JavaScript problem but a bug in the way Firefox handles ...
🌐
Mozilla Bugzilla
bugzilla.mozilla.org › show_bug.cgi
1502726 - window.browser and window.chrome are undefined in content script
But window.chrome and window.browser are undefined. Expected results: window.chrome should be defined and equal to chrome, window.browser should be equal to browser. content script doesn't have them by design things available there is listed here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts#WebExtension_APIs if you want to access other API, you need to talk to background script by message.
Find elsewhere
🌐
Mirth Community
forums.mirthproject.io › home › mirth connect › support
Got a result of: org.mozilla.javascript.Undefined - Mirth Community
I used JavaScript and Store procedure. Im getting the following error in the Server Log. [2008-05-26 17:19:24,691] ERROR (com.webreach.mirth.connectors.jdbc.JdbcMessageRec eiver:240): Got a result of: org.mozilla.javascript.Undefined@24f4eb Here is my script DataBase reader Source:
🌐
Mozilla Support
support.mozilla.org › en-US › questions › 1165564
When I open a new tab I get undefined.com telling me to ...
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Program Creek
programcreek.com › java-api-examples › index.php
org.mozilla.javascript.Undefined Java Exaples
private void importVariables(@NonNull ScriptableObject scope) throws StethoJsException { // Define the variables for (Map.Entry<String, Object> entrySet : mVariables.entrySet()) { String varName = entrySet.getKey(); Object varValue = entrySet.getValue(); try { Object jsValue; if (varValue instanceof Scriptable || varValue instanceof Undefined) { jsValue = varValue; } else { jsValue = Context.javaToJS(varValue, scope); } ScriptableObject.putProperty(scope, varName, jsValue); } catch (Exception e) { throw new StethoJsException(e, "Failed to setup variable: %s", varName); } } }
🌐
Mozilla Discourse
discourse.mozilla.org › t › browser-downloads-undefined-in-background-script › 96687
Browser.downloads undefined in background script - Development - Mozilla Discourse
April 30, 2022 - For an extension, I’m trying to use browser.downloads in a background script like this: browser.tabs.executeScript(tabId, {file: "foo.js"}).then( function (info) { browser.downloads.download({ url: info.url, filename: info.name. }).then(...) }); This fails with browser.downloads undefined.
🌐
Javadoc.io
javadoc.io › doc › org.mozilla › rhino › 1.7.14 › org › mozilla › javascript › Undefined.html
Undefined - rhino 1.7.14 javadoc
Bookmarks · Latest version of org.mozilla:rhino · https://javadoc.io/doc/org.mozilla/rhino · Current version 1.7.14 · https://javadoc.io/doc/org.mozilla/rhino/1.7.14 · package-list path (used for javadoc generation -link option) · https://javadoc.io/doc/org.mozilla/rhino/1.7.14/package-list ...
🌐
MDN
developer.mozilla.org.cach3.com › en-US › docs › Web › JavaScript › Reference › Global_Objects › undefined
undefined - JavaScript - Mozilla Developer Network - Cach3
Please note, this is a STATIC archive ... any user information, there is no "phishing" involved. ... The global undefined property represents the primitive value undefined. It is one of JavaScript's primitive types....
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Errors › Unexpected_type
TypeError: "x" is (not) "y" - JavaScript - MDN Web Docs - Mozilla
The JavaScript exception "x is (not) y" occurs when there was an unexpected type. Oftentimes, unexpected undefined or null values.
🌐
Mozilla Discourse
discourse.mozilla.org › t › global-mdc-variable-undefined-in-firefox-but-works-fine-in-chrome › 68946
Global mdc variable undefined in Firefox but works fine in Chrome - Development - Mozilla Discourse
August 26, 2020 - I am using Parcel to bundle my content script code, I also have material-components-web library in manifest’s content-scripts/js. From the content script code that I bundle using Parcel I am trying to use window’s global variable mdc provided by material-components-web library in code using export const mdc = ( window).mdc; in file1.ts and then I import that mdc in file2.ts but this imported entity is undefined in Firefox browser but no such error occurs on Google Chrome or Brave browser.