Past-paper question · 2018 May-June · Paper 32 · Q4(c)

Question 4(c) 2018 · May-June · Paper 32 · 4 marks

Original past-paper question for 4(C)
Original past-paper question for 4(C)
Original past-paper question for 4(C)
Reveal official mark-scheme answer Official mark-scheme answer for 4(C)

Official answer for Question 4

Part (c)

✓
Four from:

Question 4

✓
The code is executed by the web browser
✓
Web browser may not support the code language
✓
So the code may not execute properly/at all/produce errors
✓
Different browsers run code in different ways
✓
Developers must test all code with all browsers
✓
Same browsers on different operating systems behave differently
✓
Code may produce different results
✓
Code requires high processing power
✓
So webpages may display slowly/not at all
✓
Non-functioning code may deter viewers leading to loss of audience/sales
✓
via the website.
✓
9626/32
✓
Cambridge International AS/A Level – Mark Scheme
✓
May/June 2018
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9626_s18_ms_32.pdf →

Show text version of question

Question 4

Part (c)

Question 4

‘Loops’ are used in JavaScript to execute a block of code several times.

The following code shows a ‘for’ loop and the code for displaying the result.

<p id="Number"></p>

<script> //JavaScript code follows var displayresult = ""; var X;

for (X = 1; X < 10; X += 3) { displayresult += X + "<br>"; } //the following line displays the contents of ‘displayresult’ on the webpage document.getElementById("Number").innerHTML = displayresult; </script>

Part (c)

The JavaScript code is deemed to be ‘client-side’ code.

Explain why the use of ‘client-side’ code can cause problems.

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

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

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

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

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

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

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

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

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

Question 8

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

Keep practising this topic