Skip to main content
Participant
October 27, 2017
Question

What is wrong with this code?I am just learning and am mystified. I search the web and this forum but can't find any insight:

  • October 27, 2017
  • 2 replies
  • 263 views

I am using Acrobat Pro DC

for(var i=0;i < 5;i++) {

     console.println(i);

}

undefined

This topic has been closed for replies.

2 replies

Karl Heinz  Kremer
Community Expert
Community Expert
October 27, 2017

A common misconception is that “undefined” is an error message. That’s not the case, it just means that your code did not return anything. In this case, it is actually an indication that something did run, just not the portion of the code you wanted to execute.

try67
Community Expert
Community Expert
October 27, 2017

Nothing is wrong with it... If you're not seeing an output it's probably because you're not executing it correctly.

You need to select the code with the mouse before running it. Otherwise it will only execute the line the cursor is on.