JavaScript Starter · free course

Free course · Lesson 1 of 5

JavaScript Fundamentals & Setup

In this lesson you will

  • Run JavaScript in the browser console
  • Store values with let and const and build text with template literals

JavaScript is the only language that runs natively in every web browser, which makes it the foundation of interactive websites — and, via Node.js, of servers too. Modern JavaScript uses let and const for variables instead of the older var.

  • const for values that never get reassigned; let for values that do.
  • Core types: string, number, boolean, undefined, null.
  • Template literals (`Hello ${name}`) build strings without messy concatenation.
  • A script runs in the browser via a <script> tag, or on the server with node file.js.

💡 Practical Skill: Install VS Code and open its built-in terminal. Open Chrome DevTools (F12) and use the Console tab to run and test small pieces of JavaScript instantly.

Worked exampleVariables & Template Literals
JavaScript
const name = "Grace";let age = 22;const city = "Juba"; console.log(`${name} is ${age} years old and lives in ${city}.`); age = age + 1;console.log(`Next year, ${name} will be ${age}.`);

Practice exercise

In the browser console, store the price of three items in SSP in constants and print a sentence with their total using a template literal.

Key takeaways

  • Use const by default and let when a value must change
  • Template literals with ${} build readable text
  • Values from forms are strings — convert them with Number()
In the full program Module 1: JavaScript Setup and Basics See how this topic is taught in depth, with practical activities and an assessment.

Free self-study lesson — no certificate. For the full instructor-led program, see registration options.