Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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:

Community Beginner ,
Oct 27, 2017 Oct 27, 2017

I am using Acrobat Pro DC

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

     console.println(i);

}

undefined

TOPICS
Acrobat SDK and JavaScript , Windows
233
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2017 Oct 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2017 Oct 27, 2017
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines