What does the assignment operator do in a program?
Stores a value
What are the only two possible values of a Boolean expression?
True and false
In a zero-indexed list, what index stores the first item?
What is a named block of code that can be called later?
Function
What debugging tool prints variable values while a program runs?
console.log
What is the result of 14 % 4?
2
Which logical operator is true only when both sides are true?
AND
If a list has 6 items, what is the index of the last item?
5
What is a placeholder variable in a function definition called?
Parameter
What debugging strategy means walking through code step by step by hand?
Manual tracing
If x starts at 8, what is x after x = x + 1?
9
What is the result of NOT false?
True
What command adds a new item to the end of a list?
appendItem
What is the actual value passed into a function called?
Argument
Why might a programmer comment out part of a program while debugging?
To isolate the problem
Why is x = x + 1 valid in programming but not as a math equation?
It updates memory
Why does an else block run only after all previous conditions fail?
It is the default case
A list is [5, 10, 15, 20]. After removeItem(list, 1), what is the list?
[5, 15, 20]
Why does procedural abstraction reduce duplicate code?
Repeated steps are put in one function
A program runs without crashing but gives the wrong total. Which strategy best helps track the changing values?
Manual code tracing
A program needs to check whether a number is odd. What condition should it use?
num % 2 == 1
A score is 85. The first condition checks score > 90, and the else if checks score > 80. Which branch runs?
The else if branch
A loop goes through every score in a list and builds a new list of only passing scores. What traversal pattern is this?
Filtering
A function calculate(n) returns n * 2 + 1. What does calculate(5) return?
11
Why do functions, tracing, and testing all support better problem solving in programming?
They manage complexity