Past-paper question · 2018 May-June · Paper 12 · Q6(d)(i)

Question 6(d)(i) 2018 · May-June · Paper 12 · 1 mark

Original past-paper question for 6(D)(I)
Original past-paper question for 6(D)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 6(D)(I)

Official answer for Question 6

Part (d)

(i)

✓
Client-side
✓
e

Question 1

Mark scheme 9608_s18_ms_12.pdf →

Show text version of question

Question 6

Part (d)

(i)

Question 6

A web page includes the following HTML and JavaScript code.

01 <html> 02 <body> 03 04 <p>Enter your mark</p> 05 <input id="Mark" value="0"> 06 <button onclick="calcGrade()">Enter</button> 07 08 <script> 09 function calcGrade() { 10 var mark, grade; 11 mark = document.getElementById("Mark").value; 12 if (mark >= 90) { 13 grade = "A" 14 } else if (mark >= 80) { 15 grade = "B" 16 } else if (mark >= 70) { 17 grade = "C" 18 } else if (mark >= 60) { 19 grade = "D" 20 } else if (mark >= 50) { 21 grade = "E" 22 } else { 23 grade = "U" 24 } 25 alert("Your grade is " + grade) 26 } 27 </script>

Question 28

29 </body> 30 </html>

(i)

State whether this JavaScript code will be run client-side or server-side.

.......................................................................................................................................[1]

Topic relevance

Why this question appears here

71% assigned-topic match · Hardware › Logic gates and logic circuits

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 9608_s18_qp_12.pdf

Keep practising this topic