The second exam will, like the first, check your familiarity and fluency with programming concepts. You’ve done quite a bit of programming already, and you will have a big term project. I will assess your programming aptitude in your programming assignments. The exams are about the concepts you’ve internalized, since it is possible to program without understanding.
There are two ground rules.
- You may use any source, online or offline, during the exam, except (1) other students and (2) sources where you can ask questions and have them answered by a human. That means you can use books, notes, online code runners, and web searches, but you cannot post questions to a forum or any question-answer site, nor solicit answers or help from any human, nor can you pull information off of other students’ exams.
- You may not broadcast answers either by voice, text, instant message, coughing, hand signals, chat, or any similar medium.
The exam will cover the course notes from the beginning through Unit Testing in JavaScript.
Nearly all of the questions will be about functions and classes (which of course will necesarily deal with expressions and statements). Make sure that you know how to create a function from scratch, know what it means to have a good name for a function, know how to choose which parameters a funciton should have, know what good naming of parameters entails, and know how to choose exactly what the function should be returning. Note the word "returning": functions hardly ever do console.log-ing.
To prepare for the exam I would suggest:
- Practicing until you can use a runner or a shell very quickly and effortlessly.
- Work with a friend or friends in a group to solve some of the practice problems or exercises in Modern JavaScript tutorial.
- Write a ton of functions. While practicing, set up a suite of tests like we saw in Homework 4.
Think through answers to the following questions:
- What are the values and types of JavaScript?
- What is the difference between
null
and undefined
?
- What are the basic operators on numbers? On booleans?
- What is a safe integer?
- What are the differences between characters, glyphs, graphemes, and strings?
- What are the basic operations on strings?
- What are objects in JavaScript? What are properties?
- How do graphical representations (pictures) of objects differ from those of primitive values?
- What are arrays? What are the basic array operators?
- Which array operations are mutators and which make new arrays?
- What does it mean to say JavaScript is weakly typed?
To prepare for the exam I would suggest:
- Practicing until you can use a runner or a shell very quickly and effortlessly.
- Running examples from the course notes, the Haverbeke book, or the online Modern JavaScript Tutorial in a runner or shell so you can understand them.
- Work with friends in a group to solve some of the practice problems or exercises in Modern JavaScript tutorial.
- Study the string operations (except search, replace, and match) until you know them well. Write sample code of your own design; that is a great way to figure them out.
- Study the array operations until you know them well. Write sample code of your own design; that is a great way to figure them out.
- Write a sample application in which you define a prototypical object and some derived objects. Use a shell to see how both owned and inherited properties work.
- Write a sample application in which you employ the JavaScript class syntax to make a new “data type.”
- Draw pictures of all the objects that you may run across in the Modern JavaScript tutorial.