Lesson 1 of 10

JavaScript Foundations

Lesson 1: Your First Code

Welcome. We are starting from scratch with Node.js, variables, and console.log.

Learning Goals

Example

When we write this, we mean we are saving text inside a variable and printing it.

// Save as lesson1.js
let message = "Hello, Patricia";
console.log(message);
Tip: Run node lesson1.js in your terminal.

Practice

  1. Create a variable called name and store your name.
  2. Create a variable called city and store your city.
  3. Print both values using console.log.
Next Lesson →