Past-paper question · 2023 February-March · Paper 32 · Q8(a)

Question 8(a) 2023 · February-March · Paper 32 · 4 marks

Original past-paper question for 8(A)
Original past-paper question for 8(A)
Reveal official mark-scheme answer Official mark-scheme answer for 8(A)

Official answer for Question 8

Part (a)

✓
Four from:

Question 4

✓
•
✓
Variable is declared to store a specified condition
✓
•
✓
Switch () used to gather/hold/collect data to be tested against the
✓
variable
✓
•
✓
Use of case to enumerate/number condition/create blocks of code that
✓
could/may be executed
✓
•
✓
Variable with the condition listed for testing (against case)
✓
•
✓
Use of break to end/jump out of switch () when variable matches
✓
case/case matches variable
✓
•
✓
Use of default at end of code block to specify code to be executed if no
✓
match (by case)

Mark scheme 9626_m23_ms_32.pdf →

Show text version of question

Question 8

Part (a)

Question 8

JavaScript code can be written to perform different actions depending on different conditions.

Part (a)

Describe the use of the switch operator, such as switch(name), in JavaScript code to select

different actions.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

[4]
Topic relevance

Why this question appears here

98% assigned-topic match · Programming for the web

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9626_m23_qp_32.pdf

Keep practising this topic