Ready. Start with one instruction.
Loading the learning workspace…
FROM YOUR FIRST INSTRUCTION TO A WORKING APPLICATION
Learn JavaScript from scratch through small working examples, visual experiments and complete projects. No account or AI key required.
Predict → Experiment → Build → Test → Explain
Ready. Start with one instruction.
Loading the learning workspace…
JavaScript is a language for giving a computer precise instructions. A website uses HTML for content, CSS for appearance and JavaScript for behavior. Your first instruction displays a message in a console, a place where a program can report what happened. You do not need any previous programming experience. The message is source code written as a string: text surrounded by quotation marks. Changing the text changes the displayed result, not the meaning of console.log.
console.log("Hello, JavaScript!");Hello, JavaScript!
console.log displays exactly the characters between the quotation marks. The quotation marks themselves are syntax and are not printed.
console.log("Hello, JavaScript!");Evaluate the argument and display its value at this point. Quoted text is literal; an unquoted identifier reads its current binding.
console.log("I can change this message!");I can change this message!
console.log displays exactly the characters between the quotation marks. The quotation marks themselves are syntax and are not printed.
console.log("I can change this message!");Evaluate the argument and display its value at this point. Quoted text is literal; an unquoted identifier reads its current binding.
console.log("My first program");My first program
console.log displays exactly the characters between the quotation marks. The quotation marks themselves are syntax and are not printed.
console.log("My first program");Evaluate the argument and display its value at this point. Quoted text is literal; an unquoted identifier reads its current binding.
Repair the intentionally changed operation so the example produces the exact expected result. Then try the extension without copying the answer.
console.log("Hello");console.log("Hello, JavaScript!");Keep matching quotation marks around text. Parentheses hold the value passed to log, and the semicolon ends the instruction.
Which operation changed the result, why did it work, and what would you test next?
Use a different value that could expose a boundary or mistake. Predict the result first, run it, and explain how the concept would help in a small real application.
Related: Next lesson
100 lessons across 20 modules, covering variables, operators, strings, conditions, loops, functions, scope, arrays, objects, DOM, events, state, testing, asynchronous JavaScript and application development.