Adobe 12001196 - Acrobat - Mac Manual page 29

Javascript
Hide thumbs Also See for 12001196 - Acrobat - Mac:
Table of Contents

Advertisement

3. Click the Clear button (trash can icon) just below the console window to delete any
contents that appear in the window.
4. Type the following code into the console:
var myNumber = 1776;
5. With the mouse cursor positioned somewhere in this line of code, press Enter on the
numeric keypad or Ctrl+Return on the regular keyboard to evaluate the code. You
should see the results shown in
F
IGURE
The console window prints out undefined, the return value of the variable declaration.
Note that the result of an expression is not the same as the value of a variable set in the
expression. In this case, the return value undefined does not mean that the value of
myNumber is undefined, just that the expression as a whole returns undefined.
6. To evaluate just the myNumber variable (part of a whole JavaScript statement) in the
console window, highlight the variable name and press Enter or Ctrl+Return. You should
see the results shown in
Acrobat JavaScript Scripting Guide
2.5
Evaluating the variable declaration
Figure
Acrobat JavaScript Editor and Debugger Console
Exercise: Working with the JavaScript Console
Figure
2.5.
2.6.
2
29

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat 6.0

Table of Contents