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…
The console shows diagnostic messages from the current execution. log is an ordinary message, warn calls attention to a possible problem, and error records an error-level message. They all receive values inside parentheses. A recorded error message is different from throwing an exception: console.error alone does not stop execution. Our captured console labels each level and keeps the newest run separate so you can compare actual output with your prediction.
console.log("Ready");
console.warn("Check your prediction.");Ready Check your prediction.
Both messages execute; warn changes the diagnostic level, not the instruction order.
console.log("Ready");Evaluate the argument and display its value at this point. Quoted text is literal; an unquoted identifier reads its current binding.
console.warn("Check your prediction.");Call the console method with the value inside parentheses. Text in quotes is literal; an unquoted name reads its current value. The console records this point in execution.
console.log("Running");
console.warn("Check your prediction.");Running Check your prediction.
Both messages execute; warn changes the diagnostic level, not the instruction order.
console.log("Running");Evaluate the argument and display its value at this point. Quoted text is literal; an unquoted identifier reads its current binding.
console.warn("Check your prediction.");Call the console method with the value inside parentheses. Text in quotes is literal; an unquoted name reads its current value. The console records this point in execution.
console.log("Finished");
console.warn("Check your prediction.");Finished Check your prediction.
Both messages execute; warn changes the diagnostic level, not the instruction order.
console.log("Finished");Evaluate the argument and display its value at this point. Quoted text is literal; an unquoted identifier reads its current binding.
console.warn("Check your prediction.");Call the console method with the value inside parentheses. Text in quotes is literal; an unquoted name reads its current value. The console records this point in execution.
Repair the intentionally changed operation so the example produces the exact expected result. Then try the extension without copying the answer.
console.log("Ready");
console.warn("Everything must be right.");console.log("Ready");
console.warn("Check your prediction.");Read the level and the message. A warning is not automatically a failed program.
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: Previous lesson 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.