Web. Everything recorded here becomes a permanent entry in their history.
Ask the prepared questions and mark each answer. The score sets the grade.
Why does semantic HTML matter? Give examples of semantic elements.
It gives meaning to structure for screen readers, search engines and other developers: <header>, <nav>, <main>, <article>, <button>, <label>. A clickable <div> has no keyboard support or role; a <button> does.
<header>
<nav>
<main>
<article>
<button>
<label>
<div>
Explain the CSS box model.
Every element is content + padding + border + margin. box-sizing: border-box makes width include padding and border, which is easier to reason about.
box-sizing: border-box
When would you use flexbox and when grid?
Flexbox lays items out in one dimension (a row or a column), good for toolbars and aligning items. Grid handles two dimensions (rows and columns together), good for page layouts and card grids.
What is the difference between `let`, `const` and `var`?
let and const are block-scoped; const cannot be reassigned (the object it points to can still change). var is function-scoped and hoisted, which causes bugs — avoid it.
let
const
var
Explain the event loop, and in what order `setTimeout(…, 0)` and a resolved Promise callback run.
JavaScript runs one call stack. When it is empty, the event loop runs all microtasks (Promise callbacks) first, then the next macrotask (timers, events). So the Promise .then runs before the setTimeout(…, 0) callback.
.then
setTimeout(…, 0)
How does `async`/`await` relate to Promises, and how do you handle errors with it?
async functions always return a Promise; await pauses until a Promise settles. Handle errors with try/catch (or .catch on the returned Promise). Use Promise.all to run independent requests in parallel instead of awaiting them one by one.
async
await
try/catch
.catch
Promise.all
What are props and state in a component, and how do they differ?
Props are inputs passed from a parent and are read-only in the child. State is data a component owns and changes over time; changing it re-renders the component.
When should state be lifted up, and when do you need shared or global state?
Lift state to the nearest common parent when siblings need the same data. Use context or a store only for truly app-wide data (current user, theme) or when prop drilling gets deep. Keep server data in a data-fetching cache rather than global state, and derive values instead of duplicating them.
When calling an API from a screen, which states must the UI handle?
Loading, success, empty, and error (with a way to retry). Also cancel or ignore stale responses when the input changes, and avoid double-submits on mutations.
Why do list items need a stable `key`, and why is the array index a bad key?
The key lets the framework match items between renders. With the index, inserting or reordering items attaches state and DOM to the wrong item. Use a stable id from the data.
Compare client-side rendering, server-side rendering and static generation. How do you choose?
CSR renders in the browser: simple hosting, slow first paint, weaker SEO. SSR renders per request: fast first content and SEO, needs a server. Static generation renders at build time: fastest and cheapest, but data can be stale (revalidation helps). Choose by how dynamic and personalised the data is and SEO needs.
How do you make a form accessible?
Every input has a <label>; errors are announced and linked to the field; everything works by keyboard with a visible focus; enough colour contrast; do not rely on colour alone; use native elements before ARIA.
What are Core Web Vitals, and how would you improve a poor LCP?
LCP (loading of the largest element), INP (responsiveness to input), CLS (layout shift). Improve LCP by optimising and preloading the hero image, reducing render-blocking CSS/JS, server-rendering the content, using a CDN and caching.
Explain XSS and how to prevent it.
Cross-site scripting: attacker-controlled input is rendered as script in another user’s page. Prevent it by escaping output (frameworks do this by default — avoid dangerouslySetInnerHTML/innerHTML with user data), sanitising any HTML you must render, a Content Security Policy, and HttpOnly cookies.
dangerouslySetInnerHTML
innerHTML
HttpOnly
What is CORS and why does the browser enforce it?
The same-origin policy stops a page reading responses from another origin. CORS lets a server opt in with headers such as Access-Control-Allow-Origin; non-simple requests are preceded by a preflight OPTIONS. It protects users’ data in the browser — it is not server-side security.
Access-Control-Allow-Origin
OPTIONS
A page feels slow when typing in a search box. How do you find and fix the cause?
Profile with the browser Performance tab / framework profiler to see what re-renders and how long it takes. Typical fixes: debounce the input, memoise expensive children, virtualise long lists, move heavy work off the main thread, and avoid state updates that re-render the whole page.
A 90–100B 80–89C 70–79D 60–69E below 60· Basic 1pt, Intermediate 2pt, Advanced 3pt
Currently verified A · they self-assessed A
Leave a dimension blank if this assessment did not cover it — a blank is more honest than a guess, and blanks show as gaps rather than zeros.
The grade rests on the Q&A alone. Cite a practical task, code review or project work as well to raise confidence.
Using AI is not a negative. What matters is whether they understand and control the solution.
Not assessed yet — leave it blank if this review did not cover it.
Thin or single-source evidence — treat this level as provisional.