Past-paper question · 2017 February-March · Paper 32 · Q9(a)

Question 9(a) 2017 · February-March · Paper 32 · 4 marks

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

Official answer for Question 9

Part (a)

✓
Four from:

Question 4

✓
Method 2 uses an array...
✓
....which stores multiple values in a single variable
✓
More suitable for storing large numbers of items/data items as it
✓
reduces the complexity of the code
✓
Increases the code easier to understand
✓
Increases the execution speed of the code
✓
Method 2 can be looped through using an iterative function
✓
...to find a specific data item

Mark scheme 9626_m17_ms_32.pdf →

Show text version of question

Question 9

Part (a)

Question 9

JavaScript can be embedded in the code of web pages to add interactivity to a page.

Jonas uses JavaScript code to store, list and display the names of cities on a web page.

Part (a)

Two methods of storing the names are shown below.

Method 1:

var city1 = "London"; var city2 = "Cambridge"; var city3 = "Oxford"; var city4 = "Manchester";

Method 2:

var city = ["London", "Cambridge", "Oxford", "Manchester"];

Explain why storing the names using Method 2 is more suitable for storing large numbers of cities.

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

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

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

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

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

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

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

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

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

...............................................................................................................................................[4]

Question 13

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_m17_qp_32.pdf

Keep practising this topic