Question 11 2017 · October-November · Paper 32 · 6 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 11
While the shop is closed in the morning, a message saying “Sorry, we are closed” is displayed. After the shop has closed in the evening a message saying “Please try again tomorrow” is displayed. At all other times, a message saying, “Hello, we are open now” is displayed.
JavaScript code can be used to alter web pages in real time.
Complete the code in the function below that will allow a user to find out if the shop is open or closed.
function OpenTimesFunction() { var welcome; var timenow = new Date().getHours();
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
document.getElementById(“open”).innerHTML = welcome; //This line displays the result of the code }
Question 15
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_w17_qp_32.pdf
