Past-paper question · 2017 May-June · Paper 31 · Q3

Question 3 2017 · May-June · Paper 31 · 6 marks

Original past-paper question for 3
Original past-paper question for 3
Reveal official mark-scheme answer Official mark-scheme answer for 3

Official answer for Question 3

✓
Six from:

Question 6

✓
Can call the code several times/from different pages/re-use the code
✓
No need of re-writing/having several copies/copies on each webpage
✓
Code only has to be tested once/checked for errors once
✓
File/JavaScript is cached by web browser
✓
...reduces network access time/reduces cost of fetching data
✓
JavaScript code embedded in webpages can slow loading times/reduce
✓
browser performance
✓
...webpage can slow/stop while browser executes code
✓
Can separate code into different conceptual/functional areas
✓
...provides modularity to code
✓
...separate html and JavaScript code so easier to read/maintain.

Mark scheme 9626_s17_ms_31.pdf →

Show text version of question

Question 3

Frank is a web designer who writes his own code and uses JavaScript on his webpages. He wants to print his name on every page. He creates two versions of the code to run his JavaScript on the webpage. These versions are represented here:

Version 1:

<script language="JavaScript"> document.write ("<p>My name is <b>Frank </b> </p>"); </script>

Version 2:

<script language="JavaScript" src="FranksJavaScriptcode.js"> </script>

where the instructions for writing Frank’s name are in the file called “FranksJavaScriptcode.js”

Explain why Frank prefers to use Version 2 of the code.

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

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

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

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

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

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

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

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

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

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

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

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

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

......................................................................................................................................................[6]

Question 6

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

Keep practising this topic