title: Why is console.log used? What does it do?
body: <p>I can see many place used <code>console.log()</code>. Can anyone tell me why it is used?</p>
  
  <p>Something like this,</p>
  
  <pre><code>function createCheckBox( idsToShow ) {
      for( i = 0 ; i &lt; 15 ; i++ ) {                
         console.log( idsToShow.indexOf('main' + i + '|' ) + '  ' + 'main' + i + '|' );
         if( idsToShow != '' &amp;&amp; idsToShow.indexOf('main' + i + '|' ) == -1 ) continue;
         checkBoxs += "&lt;li&gt; &lt;input type=\"checkbox\" id=\"main" +  i + "\" value=\"Example" + i + "\" name=\"lbl"+ i +"\" /&gt; &lt;label id=\"lbl"+ i +"\"&gt;Example" + i + "&lt;/label&gt;&lt;/li&gt;";                                    
         ids += 'main' + i + '|'; //is the check box id.                     
      }
  }
  </code></pre>