I am relatively new to learning Javascript and could use some assistance with the code snippet shared below which is from Eloquent Javascript.
var journal = [];
function addEntry(events, didITurnIntoASquirrel) {
journal.push({
events: events,
squirrel: didITurnIntoASquirrel
});
}
addEntry(['work', 'lunch', 'peanuts', 'exercise'], false);
console.log(journal[0]);
Can someone guide me on how to display the contents of the journal array in the console?
Your help would be greatly appreciated.
Thank you!