title: What is the equivalent of Java's System.out.println() in Javascript?
body: <p>I am writing some tests for Javascript code and I need to dump some messages during the compile process when errors are encountered.</p>
  
  <p>Is there any equivalent to Java's <code>System.out.println()</code> in Javascript?</p>
  
  <p><strong>P.S.</strong>: I also need to dump debug statements while implementing tests.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I am using a maven plugin on a file containing all merged tests:</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                  &lt;phase&gt;test&lt;/phase&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;java&lt;/goal&gt;
                  &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;mainClass&gt;org.mozilla.javascript.tools.shell.Main&lt;/mainClass&gt;
                  &lt;arguments&gt;
                      &lt;argument&gt;-opt&lt;/argument&gt;
                      &lt;argument&gt;-1&lt;/argument&gt;
                      &lt;argument&gt;${basedir}/src/main/webapp/html/js/test/test.js&lt;/argument&gt;
                  &lt;/arguments&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p><strong>UPDATE II</strong></p>
  
  <p>I tried <code>console.log("...")</code>, but I get:</p>
  
  <pre><code>js: "src/main/webapp/html/js/concat/tests_all.js", line 147:
  uncaught JavaScript runtime exception: ReferenceError: "console" is not defined
  </code></pre>
  
  <p>The code I am testing is a set of functions (like in a library). I am using QUnit.</p>