You’ll be doing a comprehension test. It will be about the most important JavaScript concepts you’ve learned about so far (JavaScript1 and JavaScript2).
- The test will start at 10.30 until 11.30. Please be available from 10.15 to avoid being late!
- It will be done online
- There will be 3 questions
The purpose of this exam is to test your comprehension of JavaScript 1 and JavaScript 2 concepts.
- 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.
These are the most important concepts that will be tested:
Variables
Data types
(strings
,numbers
,arrays
,objects
,booleans
)Conditional statements
(if
/switch
statement)Loops
ES5 functions
andarrow functions
- How to use JavaScript to do basic
DOM manipulations
(add, modify and remove DOM elements) Code commenting
Array functions
(map
andfilter
)Callbacks
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.
-
Be familiar with the homework submission process using Git and GitHub. This is the same procedure you'll undergo when starting and submitting your test!
-
Ask questions through Slack to your teachers and/or your classmates
-
Practice coding WITHOUT Google and on paper. This is very important because the test will be on paper. You can practise this by making your old homework again; but than on paper. Make sure that you can write down functions and loops without syntax errors.
-
Practice for understanding (why something is the case), NOT just for repetition’s sake (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.
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.
- Make sure that all syntax is correct when writing code on paper. For instance: don’t forget brackets or semicolons.
- If you get stuck in an assignment, move on to the next one. You can always come back later if time permits.
- 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. Double check your work!
-
Write and call a function that creates and appends a
tag to the of an HTML file. Make use of the already predefined DOM methods createElement() and appendChild(). The innerText of the
should be “hello HackYourFuture!”.
-
Correct the code to make it work, by filling in the grey boxes:
…………… multiplyNumbers( …….. , …….. ) {
const …………… = …….. * …….. ;
return …………… ;
….
multiplyNumbers( 6 , ……………
// Return value should be 30
- Transform the given array of strings named letters into a new array with numbers (for example:
numbers = [0, 1, 2, 3 ]
), by creating a new function called lettersToNumbers. Log the new array to the console. Return the new array. Make use of the map() array function.const letters = [ ‘a’ , ‘b’ , ‘c’ , ‘d’ ];
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.