Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Latest commit

 

History

History
66 lines (46 loc) · 3.92 KB

test.md

File metadata and controls

66 lines (46 loc) · 3.92 KB

Final javascript test

You’ll be doing a final JavaScript test. It will be about all the JavaScript you’ve learned, from JavaScript 1 to JavaScript 3.

Practical information

  • The test will last 2 hours.
  • It will be done on the computer.
  • You can’t use your old code.
  • There will be 6 or 7 questions.

Purpose of the test

The purpose of this exam is to test your comprehension of JavaScript

  • The goal for us is to know how solid your knowledge is and if you need any extra assistance throughout the program.
  • The goal for you is to test how well enough you master the material so far.

Like the homework you will get feedback and are expected to improve upon your weak points.

Test material

The test will be about all main JavaScript concepts we have discussed for the past weeks of JS. The following are the most important that will be tested:

  • Functions & Variables
  • Scope
  • Loops
  • Callbacks & Promises
  • Array functions
  • Conditional statements
  • DOM manipulations
  • Fetch & HTTP Requests
  • Promises & Async/await
  • Try…catch

Preparation

Advice on how to optimally prepare:

  • Find out 2 things about each concepts listed above: (1) how does the basic structure look and (2) what is the most common use case.
  • Ask questions through Slack to your teachers and/or your classmates.
  • Practice for understanding (why something is the case), NOT just for repetition shake (and hoping ‘you will understand it one day’).
  • Make a summary of all the study material.
  • After you prepared try to make the sample questions that are in this file.

During the test

Advise on how to make a test:

  • Look for low hanging fruit. Which of the assignments is easiest for you to do? Tackle that one first.
  • When writing your code, write small chunks at a time, testing each time before continuing. Use temporary console.log statements to show intermediate results (remove when no longer needed). Don't continue until the code written sofar is working correctly. If you write a whole bunch of code without intermediate testing it becomes difficult to pinpoint where issues occur.
  • If you get stuck in an assignment, move on to the next one. You can always come back later if time permits.
  • When writing code for the browser, always open the Chrome Developer Tools. Watch out for error messages in the browser console. Inspect the network tab to examine the data returned from a remote API.
  • Don't over-deliver. If styling is not required by the assignment, skip it. If time permits, you can do it later. The same goes for handling fetch errors. Focus on delivering a minimum working version that meets the requirement. Ticking off a working version again reduces your stress level. Come back later, if time permits, to embellish your solutions.
  • Don't use Google as a replacement for common sense.
  • After finishing an assignment, read the question again to make sure you actually gave an answer to the question.
  • Before handing in the test, read it all over again to pick out the small mistakes.

Sample questions

  1. Using JavaScript only (adding HTML to index.html is NOT allowed), create a button element (with text "click me!") and an empty image element and add it to the document. When the button is clicked, insert an image URL into the tag and remove the button. Use the following image URL: https://thehub.dk/files/5ad4b4a9f9ac4aa13c3d2d58/logo_upload-6d537cf7e5de664db275b32b3c6ae12d.png

  2. Make a HTTP Request using the Fetch API or the regular XMLHttpRequest (whichever one you're more comfortable with). Use the following API: https://reqres.in/api/users Parse the response and then display the "first_name" and "last_name" of the first three users within the DOM (inside an unordered list)

If there’s anything unclear please let us know. Also, if any of you need additional support, now is the moment to let us know as we could pair you up with someone to answer any questions you may have.