Why are variables important in interactive programs?
Variables allow programs to change, update, and store information.
What type of error happens when code is typed incorrectly?
Syntax Error
Why is debugging an important skill for programmers?
Debugging helps programmers find and fix coding mistakes.
Why is console.log() helpful during programming?
It helps programmers display and test information.
How might variables be used in a video game?
Variables can store scores, player names, health, or levels.
Analyze the statement below:
let score = "10";
Is the value a string or a number?
The value is a string because it is inside quotation marks.
What type of error happens when a variable is never created?
Reference Error
Analyze the code below:
console.log(studentName);
What error could happen if studentName was never created?
A Reference Error could happen.
What is a string in JavaScript?
Text inside quotation marks.
Why is teamwork helpful during debugging?
Partners can help explain ideas and find mistakes.
Analyze the statement below:
let score = "10";
Is the value a string or a number?
The value is a string because it is inside quotation marks.
What type of error happens when a program runs but gives the wrong answer?
Logic Error
Analyze the code below:
let age = 14
console.log(age);
Identify the syntax mistake.
The semicolon is missing.
Why are quotation marks important in JavaScript strings?
Quotation marks tell the computer that the value is text.
What skills do programmers use during debugging?
Problem-solving, patience, critical thinking, and attention to detail.
How do variables help programmers solve problems?
Variables help programmers manage and organize information efficiently.
Why is identifying coding errors quickly important?
Finding errors quickly helps programmers fix problems and save time.
What habits help programmers become stronger debuggers?
Reading code carefully, testing step-by-step, and checking syntax.
How does console.log() help programmers during debugging?
It helps programmers check values and find mistakes.
Why is careful reading important in programming?
Careful reading helps programmers identify coding mistakes.
A programmer creates a variable but never uses it in the program. Why could this become a problem in larger programs?
Unused variables can make programs confusing, disorganized, and harder to debug.
let city = "Baltimore";
console.log(cities);
What type of coding error could occur and why?
A Reference Error could occur because the variable cities was never created.
Why should programmers debug one problem at a time instead of changing many lines of code at once?
Fixing one problem at a time helps programmers clearly identify which mistake caused the issue.
Analyze the statement below:
let number = "25";
Why would this value be treated differently from the number 25?
The value is treated as text because it is inside quotation marks.
Why is patience considered an important skill during debugging and programming?
Programming mistakes can take time to solve, so patience helps programmers stay focused and continue problem-solving effectively.