JSFiddle - React, Tailwind, and code Playground
Using {} in console.log to see the variable.
JavaScript
var myString = 'this is a string';
var myObject = {
'one': 1,
'two': 2,
'three': 3
}
var myArray = ['one', 'two', 'three'];
console.log({myString});
console.log({myObject});
//console.log({myObject['one']});
console.log({myArray});
//console.log({myArray[0]});
// fails to work as expected
console.log('this is a string: ' + {myString});