Skip to main content
Dat 3. semester
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Examples of exam questions

Example of exam questions

Here you can find examples of the types of questions that you can expect to be asked during the exam. These questions are based on the learning objectives for the frontend course and are meant to help you prepare for the exam.

JS

  1. What are higher-order functions in JavaScript and what are the benefits? Show some examples in your own code.
  2. Show some examples where you used a higher order function (that takes a callback function as argument). Explain the benefits of doing that.
  3. What is the purpose of the package.json file and what can you do with it?
  4. Show and explain how to use the fetch function in JavaScript.
  5. Show the difference between synchronous and asynchronous programming and how does async and await fit into this?
  6. What is the difference between localStorage and sessionStorage in JavaScript?
  7. Show the use of different storage options in browsers developer tools.
  8. Show an example of DOM manipulation in JavaScript.
  9. Show and explain the concept of event bubbling in JavaScript.
  10. What is the scope of a variable in JavaScript? Explain the difference between global and local scope.
  11. Show and explain the spread operator in JavaScript and how it differs from the rest operator?

REACT

  1. What is the main concept of an React component? Show and explain in your own code.
  2. Explain the benefits of using components compared to how you would build a web application in vanilla javascript.
  3. What is JSX? Provide an example.
  • How would you write the same functionality if you only used Javascript, HTML and DOM manipulation?
  1. Show and describe the purpose of props including children.
  2. Show and explain the role of state in a React component.
  3. How do you handle errors (HTTP or JS errors) in React? Show examples in you own code.
  4. Provide examples for different ways of doing conditional rendering.
  5. Show and explain the useEffect hook (eg. callback, dependency array etc.)
  6. Show and describe event handling in React (eg. onClick, onChange, onSubmit etc.)
  7. Show examples of how to handle form submit events.
  8. Show and explain how the map function is used for rendering lists in React and explain the purpose of the key attribute in React lists?
  9. Show and explain how controlled components are different from uncontrolled components in React forms?
  10. What are React Hooks? Provide examples of at least two built-in hooks.
  11. Show example of how you handle errors in React.

Security/Routing/Styling

  1. Explain what React-Router is and which problems does it solve?
  2. Show and explain the essential building blocks of React-Router.
  3. Describe the purpose of flexbox and grid in css, and show some examples of what can be achieved by applying them.
  4. Describe conceptually how we deploy a React frontend application to the Caddy server through the CI/CD pipeline.
  5. What is the purpose of Caddy? Explain how we use it in our deployment pipeline (reverse proxy / serving static files / HTTPS certificate handling).
  6. Show and explain conceptually a typical flow of using JWTs for user authentication in a React application.
  7. Show and explain the different parts of a JWT token.
  8. How do we use it in our React application?
  9. Describe and show the login process using JWT
  10. Describe conceptually what HTTPS is and how we got it working on our deployed websites.
  11. Show and explain an example of sub-routing.
  12. Describe conceptually what Same Origin Policy (SOP) and Cross Origin Ressource Sharing (CORS) are, and how we avoid getting CORS errors when fetching data from your API.