noknow.dev
Sign inSign up
Course overview
JavaScript Fundamentals
0 / 7 lessons0%

Getting Started

  • Hello, World!
  • Variables: let and const
  • Numbers and Math

Decisions & Loops

  • if / else — Making Decisions
  • for Loops

Functions

  • Defining Functions
  • Arrow Functions

Hello, World!

0m 00s

Your first program

Every programming language starts with the same step: printing text. In JavaScript you do this with console.log().

console.log("This is my first line of output")

What happens here?

  • console is a built-in object for output
  • .log() is the function that prints text
  • The text must be wrapped in quotes — either "..." or '...'

You can also print multiple values separated by a comma:

console.log("Name:", "Alice")
// Output: Name: Alice

Your task

Set the greeting variable to "Hello, World!" — exactly that text, with an exclamation mark. The console.log line will then print it.

First lesson
javascriptCtrl+Enter to run
Output

Click "Run" to execute your code.