Javascript
JavaScript Fundamentals -- The JavaScript Console

console.info Exercise Review

PRO
Outline

Here is a possible solution to our console.info exercise. You were asked to use console.info to display:

1️⃣ Your favorite dessert

2️⃣ A message that uses multiple arguments, including a variable that contains your favorite flavor of ice cream

3️⃣ An object with two attributes, dessert (with the value 'ice cream sundae') and an array of toppings

console.info('Ice Cream');
const favorite = 'Aggie Blue Mint';
console.info('My favorite ice cream is', favorite);
console.log({
  dessert: 'ice cream sundae',
  toppings: ['caramel', 'chocolate', cherry', 'whipped cream', 'peanuts']
});

Stackblitz Solution

 

I finished! On to the next chapter