🟨
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
courseCSS FundamentalsLearn CSS from scratch with 31 hands-on exercises and a live preview editor. Selectors, colors and units, the box model, typography, display and positioning, flexbox, backgrounds and borders, transiticourseHTML FundamentalsLearn HTML from scratch with 30 hands-on exercises and a live preview editor. Document structure, text, lists, links and images, tables, forms, semantic HTML and accessibility, all runnable in your brtoolJSON 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.
Free forever, no ads, no tracking. Support the project