dailyhack icon indicating copy to clipboard operation
dailyhack copied to clipboard

Log multiple variables to the JS console with their names

Open Booligoosh opened this issue 5 years ago • 0 comments

var x = 2;
var y = 3;
var z = 'hello';
console.log({x, y, z});

This will print out the following:

{x: 2, y: 3, z: "hello"}

Booligoosh avatar Apr 09 '19 07:04 Booligoosh