Javascript
JavaScript Fundamentals -- The JavaScript Console

console.log Exercise Review

PRO
Outline

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

1️⃣ Your Name

2️⃣ Number of pizzas for your party

3️⃣ An object that describes your favorite pizza

4️⃣ An array of friends

5️⃣ Multiple arguments: "My favorite pizza is", and the pizza object

console.log('Preston Lamb');
console.log(10)
console.log({
  crust: 'thin',
  sauce: 'alfredo',
  toppings: ['chicken', 'bacon', 'ranch', 'tomatoes']
});
console.log(['Joe', 'Brooke', 'Amanda']);
console.log('My favorite pizza is', {
  crust: 'thin',
  sauce: 'alfredo',
  toppings: ['chicken', 'bacon', 'ranch', 'tomatoes']
})

Stackblitz Solution

 

I finished! On to the next chapter