Past-paper question · 2022 October-November · Paper 32 · Q9(b)

Question 9(b) 2022 · October-November · Paper 32 · 0 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)

✓
Four from:

Question 4

✓
Use of same (type of) quotes causes code to stop executing so string is not
✓
displayed
✓
Code returns focus to HTML/stops browser from executing the remainder of
✓
page code
✓
JavaScript strings must be enclosed by matching quotes
✓
Quotes inside quotes cannot be the same as the enclosing quotes
✓
Inside quotes can be escaped/use of backslash i.e. \
✓
Quotes can be either single(‘) or double (“).
✓
Cambridge International AS & A Level – Mark Scheme
✓
9626/32
✓
October/November
✓
PUBLISHED
✓
2022
✓
Question
✓
Answer
✓
Marks

Mark scheme 9626_w22_ms_32.pdf →

Show text version of question

Question 9

Part (b)

Question 9

A programmer is writing some JavaScript code to display this text on a web page:

This is “Cambridge International IT 9626 Paper 3”

The programmer uses strings in the code.

Part (b)

The programmer’s first attempt at the HTML and JavaScript code is shown in Fig. 9.1. Line

numbers are shown only for your use when referring to the code.

1 <!DOCTYPE html> 2 <html> 3 <body>

Question 4

5 <h2>This is "Cambridge Assessment International Education"</h2>

Question 6

7 <p id="string"></p>

Question 8

9 <script>

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

Keep practising this topic