How to print result of some javascript execution in ScriptEditor? I want to test a piece of a very simple javascript and print out the result. The Script Editor however only prints out undefined in the Result pane. 


What is the easiest way to print out the result?
The result pane displays the result of the evaluation so the easiest way to print the result is to execute:

Math.round(5.0/2)


Using console.log() does work from the command line:

osascript -l JavaScript -e 'console.log(Math.round(5.0/2))'