Answered
Why do I keep getting undefined in Acrobat Javascript console?
Here's a simple Javascript for-loop in Acrobat console. It works in any other console except Acrobat.

Any idea why?
I have also tried the following and still get undefined.
for(let i = 0; i < 10; i++){
console.log(i);
};
