Question 12 2019 · October-November · Paper 32 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 12
Question 5
Question 4
Question 5
Question 6
Question 3
Question 9
Question 2
Question 7
Question 1
Question 8
Question 4
Show text version of question
Question 12
</html>
Explain, giving reasons, why no output is produced when this JavaScript is executed by a web browser as part of a web page.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
....................................................................................................................................................
Question 5
Question 6
4 A web page uses JavaScript code to display a list of food crops.
Line numbers are provided only for your convenience when referring to the code.
1 <html> 2 <body> 3 <p id="foodcrops"></p> 4 <script> 5 var crops = ["corn", "rice", "maize", "sugarcane"]; 6 var i = 0; 7 var show = ""; 8 while (crops[i]) { 9 show += crops[i] + "<br>"; 10 i++; 11 } 12 document.getElementById("foodcrops").innerHTML = show;
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_w19_qp_32.pdf
