Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1<input type="text" id="username"> | AA front-end user interface element that collects input from the user on their device | |
| 2fetch('/api/orders') | Bif (email.includes('@') === false) { alert('Enter a valid email'); } | |
| 3The front-end checks input on the user's device before sending it, so obvious mistakes are caught early | Cdocument.getElementById('result').textContent = data.total; | |
| 4The front-end shows output to the user by updating what appears on the screen | DClient-side checks can be bypassed, so the back-end must still validate input. The front-end check only gives quick feedback to the user. | |
| 5Front-end: the database that stores all customer records on the company server | EThe front-end sending a request to the back-end to get data | |
| 6Client-side input check = the only security a system needs, so the back-end can trust all input | FStoring and managing data on the server is the job of the back-end, not the front-end. The front-end is the interface on the user's device. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
front-end — The part of a system the user sees and uses. It runs on the user's device, collects input through the interface, checks it, sends requests to the back-end and shows the output.<input type="text" id="username">if (name.length === 0) {
alert("Please enter your name");
}const reply = fetch("/api/scores");const out = document.getElementById("out");
out.textContent = result;button.addEventListener("click", checkForm);