Getting Started

JavaScript Introduction

Understand what JavaScript is and create a first practical example.

JavaScript is a practical technology used to build real software. This introduction explains its role in plain language and gives you a small example to change.

Your first step

Read the example one line at a time. Predict the result, run it, and then change one value.

Important definitions

JavaScript
The technology explored in this course.
Source code
Instructions written by a developer.
Output
The result produced from source code.

Syntax

Use this general pattern as a reference:

JAVASCRIPT
const name = "CodePlus";

Examples

Store a value

EXAMPLE 1
const topic = "JavaScript";
ResultA variable named topic.

Show a message

EXAMPLE 2
console.log("Hello!");
ResultHello! in the console.
Try it yourself

Expected output

Hello from JavaScript!

Note

Focus on the idea before memorizing punctuation.

Tip

Type the example yourself and change one part at a time.

Common mistakes

  • Copying code without reading it.
  • Changing several things before testing.
  • Ignoring error messages.