diff --git a/console.js b/console.js index d381020..d5f3a0b 100644 --- a/console.js +++ b/console.js @@ -26,8 +26,10 @@ const foo = { name: 'tom', age: '20', available: 'yes' } const bar = { name: 'dick', age: '23', available: 'no' } const baz = { name: 'harry', age: '26', available: 'no' } -console.log({ foo, bar, baz }); +// Creates an array with all previously created objects +const objArr = [foo, bar, baz] +console.log({ foo, bar, baz }); // Printing the above objects with some cool heading console.log('%c Objects with name', 'color: blue'); @@ -65,6 +67,9 @@ console.error('Looks likes you did somehing wrong :('); console.assert(false,"This is a false assertion"); console.assert(true,"This is a true assertion"); +// Displays the objects as table with the array indexes +console.table(objArr) + // Using console to print an image console.log('%c' + 'Hello Console!', '\ font-size: 3em; \