In javascript, if I have 3 variables like this:
var x = 1
var y = 'cat'
var z = {color: 'blue'}
I can log all of them like this:
console.log('The values are:', x, y, z)
In dart, you can import 'dart:html'
and it will map print
to console.log
in the compiled javascript. But print
only takes one parameter - not 3. This dart will fail when the compiled js runs in the browser:
print('The values are:', x, y, z)
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.
Is it possible to print multiple objects with one print
statement (or similar statement)? If so, how?