Past-paper question · 2023 October-November · Paper 32 · Q6(a)

Question 6(a) 2023 · October-November · Paper 32 · 4 marks

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

Official answer for Question 6

Part (a)

✓
Four from:

Question 4

  • Loops through a block of code a number of times
✓
− depending on the outcome of testing a condition/counting a condition
✓
set in the code
  • Requires (at least/usually) three expressions/statements in the syntax
✓
− A declared variable/an expression to be evaluated (before each
✓
iteration)
✓
− Expression to be evaluated at start may be omitted/not always
✓
required/does not produce an error by JavaScript if omitted
✓
− Expression to be evaluated at end of each iteration/increment the
✓
value of the declared variable
  • Incrementing the variable at end of iteration/loop is optional
  • Loop continues until condition is met
  • Loop will/may continue forever if condition not met
  • If evaluate statement (which is expression 2) is omitted then a Break
✓
must be included to prevent loop going on forever

Mark scheme 9626_w23_ms_32.pdf →

Show text version of question

Question 6

Part (a)

Question 6

Loops in JavaScript repeatedly execute blocks of code.

Part (a)

Describe how a for loop works in JavaScript code.

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

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

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

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

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

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

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

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

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

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

[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_w23_qp_32.pdf

Keep practising this topic