🟨
JavaScript Fundamentals
Level
11 lessons74 exercises~20h74 hands-on exercises to learn JavaScript from scratch. Variables, math, arrays, objects, classes, DOM manipulation, async programming and REST APIs, all runnable in your browser.
01. Variables & Basics
Variables, alerts, prompts and conditionals.
What you will learn
Every JavaScript program starts with variables — named containers that store values.
In this lesson you will declare variables, interact with the user through alert() and
prompt(), and make decisions with if / else.
Key concepts
letandconst— block-scoped variable declarationsalert()— display a message to the userprompt()— ask the user for input (returns a string)confirm()— ask a yes/no question (returns a boolean)if / else if / else— conditional execution
Exercises (4)
Variables & Alert
●●●
Create a variable with the name of your choice and set its value to the string "Hello, World!". Display it using console.log().
JavaScript
Output
Click "Run" to execute your code...
Related
toolJSON FormatterProfessional JSON formatter with tree view, diff compare, schema validation, and syntax highlighting.toolTime ConverterProfessional time converter with UNIX timestamp support, timezone conversion, duration calculator, and ISO 8601 formatting. Modern harmonized UI with quick examples.toolRegex TesterWrite and test regex patterns with sample input, flags, matches, groups, and replace.toolJSON to TypeScriptConvert JSON objects into TypeScript interfaces with automatic type inference, nested object support, and array detection.
Free forever, no ads, no tracking. Support the project