Stage where you gather requirements and define what the app should do.
Planning
Your client explains what features they want in their new website. What stage is this?
Planning
Error type that happens while the program is running and causes it to crash.
Runtime error
Simple JavaScript method used to print values to the browser console.
console.log()
const num = prompt("Enter a number:");
alert("Your number doubled is " + num * 2);
The alert shows unexpected results for some inputs. What’s the fix?
Convert input to a number, e.g. Number(num) or parseInt(num)
Stage where you decide UI layout, data flow, and technology stack.
Design
You sketch wireframes and choose color schemes. What stage are you in?
Design
Error where the code runs without crashing but produces the wrong result.
Logic error
Browser feature used to pause code on a specific line.
Breakpoint
let count = 0;
consol.log(count);
Why does this fail?
console is misspelled as consol
Stage where the team actually writes the HTML, CSS, and JavaScript.
Development / Implementation
You upload your finished app to a web server and make it public. What stage is this?
Deployment
User types letters into a numeric-only field, causing problems. What kind of error is this?
Input validation error
Name of the panel in browser DevTools where you can step through JavaScript.
Sources / Debugger panel
if (score = 100) {
alert("Perfect!");
}
What is the logic bug?
Uses assignment = instead of comparison == or ===
Stage focused on checking for bugs and verifying the app meets requirements.
Testing
Users start reporting bugs after launch. Which stage handles that?
Maintenance
You forget a closing parenthesis and the script won’t run at all. What kind of error is this?
Syntax error
What is the main advantage of using breakpoints instead of only console.log()?
You can pause execution and inspect variables and call stack at specific points.
let total;
console.log(total + 5);
The console shows NaN. Why?
total is undefined before being given a numeric value
Stage where the app is in use, and you fix bugs and add improvements over time.
Maintenance
You run user tests and adjust the app based on their feedback. Which two stages are you bouncing between?
Testing and Maintenance (or Testing and Development)
You validate input on the client side only and users bypass it. What kind of weakness is this?
Poor or incomplete validation / relying only on client-side validation
Which DevTools feature lets you monitor the value of an expression as code runs (without editing code)?
Watch expressions / Watch panel
function add(a, b) {
return a + b;
}
console.log(add(2));
What’s wrong and how do you avoid it?
Only one argument is passed, b is undefined. Ensure both parameters are provided or set a default value.