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

Question 9(b) 2017 · February-March · Paper 32 · 2 marks

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

Official answer for Question 9

Part (b)

✓
Two from:

Question 2

✓
Jonas wanted to explain/add comments to the code/what the
✓
line of code means/is for
✓
To make it clear that the code referred to a list of the cities
✓
Ensures that the explanation/comment was ignored by the web
✓
browser
✓
To make the code more readable/understandable

Mark scheme 9626_m17_ms_32.pdf →

Show text version of question

Question 9

Part (b)

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 (b)

Jonas has added some lines to the JavaScript code:

/* The code below stores the list of cities. */ var city = ["London", "Cambridge", "Oxford", "Manchester"];

Explain why Jonas would have added the new code to the script.

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

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

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

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

...............................................................................................................................................[2]

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