JavaScript Fundamentals -- The JavaScript Console

console.log + Exercise


In this video, we learn how to use the console.log method. This method prints a generic message to the JavaScript console. I mainly use it when debugging my code. I'll print out a message so that I know I'm in a specific function, or to check what the value of a variable is at a given point. I then delete them before going to production.

For the exercise portion of this course, you'll log the following to the console:

  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

Once you're finished, go on to the next video.


I finished! On to the next chapter