DiscoveryVIP / Interactive learningJAVASCRIPT DISCOVERY ACADEMY

FROM YOUR FIRST INSTRUCTION TO A WORKING APPLICATION

What JavaScript is and what you can build with it

Learn JavaScript from scratch through small working examples, visual experiments and complete projects. No account or AI key required.

Predict → Experiment → Build → Test → Explain

Educator & demo scripts

Ready. Start with one instruction.

Loading the learning workspace…

Printable lesson notes · What JavaScript is and what you can build with it

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.

Objectives

Worked example 1 · See the idea

console.log("Hello, JavaScript!");

Expected result

Hello, JavaScript!

console.log displays exactly the characters between the quotation marks. The quotation marks themselves are syntax and are not printed.

Line-by-line explanation

Line 1
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.

Worked example 2 · Change the value

console.log("I can change this message!");

Expected result

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.

Line-by-line explanation

Line 1
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.

Worked example 3 · Explore a boundary

console.log("My first program");

Expected result

My first program

console.log displays exactly the characters between the quotation marks. The quotation marks themselves are syntax and are not printed.

Line-by-line explanation

Line 1
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.

Independent exercise

Repair the intentionally changed operation so the example produces the exact expected result. Then try the extension without copying the answer.

console.log("Hello");
Reference solution
console.log("Hello, JavaScript!");

Hints

  1. Compare the observed result with the expected result. Read the relevant source line aloud.
  2. The operation to inspect is: Hello, JavaScript!
  3. Use Hello, JavaScript! in place of Hello. Rerun and explain why the change works.

Professional tip and common mistake

Keep matching quotation marks around text. Parentheses hold the value passed to log, and the semicolon ends the instruction.

Reflect and extend

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

Course syllabus and printable lesson notes

100 lessons across 20 modules, covering variables, operators, strings, conditions, loops, functions, scope, arrays, objects, DOM, events, state, testing, asynchronous JavaScript and application development.

1. Your First Steps into Programming
  1. What JavaScript is and what you can build with it
  2. Understanding instructions, code, and programs
  3. Running JavaScript and using the console
  4. Understanding syntax, comments, and basic code structure
  5. Building your first interactive JavaScript experiment
2. VARIABLES AND INFORMATION
  1. Understanding variables as containers for information
  2. Declaring variables with let
  3. Using const and understanding reassignment
  4. Naming variables and writing readable code
  5. Changing values and tracking program state
3. JAVASCRIPT DATA TYPES
  1. Understanding strings
  2. Understanding numbers
  3. Understanding Boolean values
  4. Understanding null and undefined
  5. Identifying and converting data types
4. OPERATORS AND CALCULATIONS
  1. Basic arithmetic operations
  2. Operator precedence and parentheses
  3. Assignment and compound assignment
  4. Increment, decrement, remainder, and practical calculations
  5. Building useful mathematical expressions
5. WORKING WITH TEXT
  1. Creating and combining strings
  2. Understanding template literals
  3. Measuring and accessing string characters
  4. Searching, slicing, replacing, and transforming text
  5. Building practical text-processing applications
6. MAKING DECISIONS
  1. Comparison operators
  2. Understanding equality and strict equality
  3. Writing if and else statements
  4. Working with else if and multiple conditions
  5. Logical operators and the ternary operator
7. REPEATING INSTRUCTIONS
  1. Understanding repetition and loops
  2. Writing for loops
  3. Writing while and do...while loops
  4. Using break and continue
  5. Nested loops and repeated patterns
8. FUNCTIONS AND REUSABLE CODE
  1. Understanding what functions do
  2. Defining and calling functions
  3. Using parameters and arguments
  4. Returning values
  5. Function expressions and arrow functions
9. SCOPE AND EXECUTION
  1. Understanding global and local scope
  2. Block scope with let and const
  3. Understanding the call stack
  4. Nested functions and introductory closures
  5. Organizing programs into smaller responsibilities
10. ARRAYS AND COLLECTIONS
  1. Creating and understanding arrays
  2. Accessing elements using indexes
  3. Adding, removing, and updating elements
  4. Iterating over arrays
  5. Searching, sorting, and organizing arrays
11. MODERN ARRAY METHODS
  1. Transforming data with map()
  2. Selecting data with filter()
  3. Finding elements with find() and related methods
  4. Accumulating values with reduce()
  5. Combining array methods into transformation pipelines
12. OBJECTS AND STRUCTURED DATA
  1. Understanding JavaScript objects
  2. Accessing and changing object properties
  3. Creating nested objects and arrays of objects
  4. Understanding references and mutation
  5. Using destructuring, spread syntax, and object methods
13. JAVASCRIPT AND WEB PAGES
  1. Understanding HTML, CSS, JavaScript, and the browser
  2. Understanding the Document Object Model
  3. Selecting elements with JavaScript
  4. Updating content, attributes, and CSS classes
  5. Creating, inserting, and removing elements
14. EVENTS AND USER INTERACTION
  1. Understanding browser events
  2. Working with click and input events
  3. Handling forms and user submissions
  4. Understanding event objects and event propagation
  5. Building accessible interactive interfaces
15. PRACTICAL WEB APPLICATIONS
  1. Understanding application state
  2. Rendering data into the interface
  3. Building reusable interface components
  4. Saving information with localStorage
  5. Combining state, events, and persistence
16. ERRORS, DEBUGGING, AND TESTING
  1. Understanding syntax, runtime, and logic errors
  2. Reading error messages and console output
  3. Debugging with breakpoints and state inspection
  4. Handling exceptions with try and catch
  5. Writing basic tests and checking edge cases
17. ASYNCHRONOUS JAVASCRIPT
  1. Understanding synchronous and asynchronous code
  2. Timers and delayed execution
  3. Understanding promises
  4. Using async and await
  5. Understanding the event loop, tasks, and microtasks
18. APIS AND EXTERNAL DATA
  1. Understanding APIs and HTTP
  2. Working with JSON
  3. Retrieving information using fetch()
  4. Handling loading states, errors, and unsuccessful requests
  5. Building an interactive application using API data
19. MODERN JAVASCRIPT DEVELOPMENT
  1. Organizing code into modules
  2. Understanding classes and object-oriented programming
  3. Writing maintainable and reusable JavaScript
  4. Understanding browser performance and efficient updates
  5. Building responsibly with AI-assisted coding
20. BECOMING AN INDEPENDENT DEVELOPER
  1. Turning an application idea into requirements
  2. Planning features, data, and interface behavior
  3. Building and testing an initial implementation
  4. Debugging, improving, and extending an application
  5. Completing and publishing your JavaScript capstone project