title: How can I print multiple objects to console.log with dart?
body: <p>In javascript, if I have 3 variables like this:</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>var x = 1
  var y = 'cat'
  var z = {color: 'blue'}
  </code></pre>
  
  <p>I can log all of them like this:</p>
  
  <pre class="lang-dart prettyprint-override"><code>console.log('The values are:', x, y, z)
  </code></pre>
  
  <p>In dart, you can <code>import 'dart:html'</code> and it will map <code>print</code> to <code>console.log</code> in the compiled javascript. But <code>print</code> only takes one parameter - not 3. This dart will fail when the compiled js runs in the browser:</p>
  
  <pre class="lang-dart prettyprint-override"><code>print('The values are:', x, y, z)
  </code></pre>
  
  <p>The only thing I can think to do is stringify these arguments and join them into one string, and print that. But then I lose Chrome's ability to expand objects that are printed to the console.</p>
  
  <p>Is it possible to print multiple objects with one <code>print</code> statement (or similar statement)? If so, how?</p>