My Study Tips for the JS129 Assessment

William Baker
Apr 26, 2020 · 10 min read

The JS129 assessment is described as having a “different style” than the JS109 assessment, and it holds true to that promise.

While it remains constant that the underlying ingredient for success at Launch School is mastery of the material, you might find yourself caught off guard by the different style of the evaluation if you aren’t prepared for it.

In this article, I’ll give some tips for how I prepared for the written and interview portion of the JS129 assessment including things that worked well for me to solidify my knowledge of object-oriented programming in JavaScript. I don’t intend this to be a comprehensive, one-stop shop for your individual preparation, but I hope some of what worked for me might benefit you as well.

The Psychology of the JS129 Assessment

As you read through the study guide for both the written and interview portion of the JS129 assessment, you will encounter descriptions of how the assessment will be a little different than the previous one: More open-ended questions requiring you to explain concepts using code examples, an opportunity to present or teach topics, and a need to drive the conversation during the interview.

These differences are a layer on top of what you did for JS109. It’s still absolutely critical that you are able to solve technical problems and produce descriptions of code and concepts with extreme precision — so don’t neglect these skills! You will have to do all that and a little more this time around.

The Stages of Competency

To understand how to navigate this additional layer, it might be helpful to consider the psychology of learning a new skill.

In getting to this point in the curriculum, you’ve undoubtedly internalized the concept of mastery. The progression from bewilderment to fluency is familiar. But along the way, you probably wondered how to know when you are ready to be assessed. I’ve struggled with this question as well — mastery is a continuous process, so how do you know when you’re “done”?

When I encountered descriptions of needing to “teach” and answer more open-ended questions for JS129, it reminded me of a learning model called the “four stages of competence”. Like any model, it isn’t perfect, but I think it provides some useful insight in determining how ready you are for this assessment.

Shown in a stacked hierarchy, the four stages of competence go from getting started with a skill at the bottom to being able to do it without thinking at the top:

Image from Wikimedia Commons. Credit: TyIzaeL / CC BY-SA

It’s obvious just from the names of “Unconscious Incompetence” and “Conscious Incompetence” that these levels aren’t going to cut it. At the level of “Conscious Competence”, you are able to demonstrate a skill, but it takes a lot of focus and effort. Moving up from there, at “Unconscious Competence” you can do that skill with basically no effort and may be able to teach it. We want to be at the top of the pyramid for this.

A Better Approach to Studying

To prepare for the previous assessment (JS109), I used the somewhat naive approach of studying until I could hardly stand to keep going. Reflecting on my process of brute-force studying, I realized this only got me to somewhere between conscious and unconscious competence. The study guide for the JS129 assessment clearly states you will be required to teach and explain concepts, so I needed to change my study habits.

Read on to see several strategies that I used to advance my understanding of OOP in JavaScript.

Improve Your Understanding by Re-Inventing the Wheel

This course introduced a variety of techniques to work with objects, including methods available from the built-in Object class and other operators.

Flash cards are a basic way to start practicing these techniques. A prompt is created to describe what task needs to be done; then code is written to show knowledge of how to do that task. A basic example of this is shown below:

Prompt: See if an object came from a constructor
Answer:
// Example constructorsfunction Car(color, year) {
this.color = color;
this.year = year;
}
function Dog(name) {
this.name = name;
}
// Objects to test withlet myCar = new Car('blue', 2020);
let myDog = new Dog('Fido');
// Possible solutions// Using 'instanceof' operator
console.log(myCar instanceof Car); // logs true
console.log(myDog instanceof Car); // logs false
// Using 'isPrototypeOf' method
console.log(Car.prototype.isPrototypeOf(myCar)); // logs true
console.log(Car.prototype.isPrototypeOf(myDog)); // logs false
// Compare the constructor property of the created object to the constructor function
console.log(myCar.constructor === Car); // logs true
console.log(myDog.constructor === Dog); // logs true
console.log(myDog.constructor === Car); // logs false

This example illustrates that there are several ways to complete the task and provides code examples of how they work. That’s enough to get to the conscious competence level, but it still might be difficult to completely explain what is going on.

The next step is to think about how the code does what it does, with the goal of understanding well enough to teach it. A good way to develop that understanding is to create functions to duplicate the behavior provided by built-in abstractions like isPrototypeOf and instanceof. Doing this requires precise knowledge of how to use these abstractions and provides a good mental model for how they work.

For example, here’s what I came up with for instanceof. This function iterates through the prototype chain of obj, comparing each prototype to the prototype property of constructorFunction. It returns true if any of them match and false if no match is found:

function isInstanceOf(obj, constructorFunction) {
while (obj) {
obj = Object.getPrototypeOf(obj);
if (obj === constructorFunction.prototype) return true;
}

return false;
}

Studying Launch School’s practice exercises will also build on this understanding. For example, the JS120 exercise called “Ancestors” involves developing a method to return the prototype chain of an object. Similarly, there’s a question in the lesson material that requires searching a prototype chain for a property and returning the object that owns it. Both of these tasks involve working with the prototype chain, and being able to recognize their conceptual connections is essential for understanding the material well enough to teach it.

Some Additional Examples:

  • See if an object contains a property as one of its own -> create your own hasOwnProperty
  • Return all the property names of an object -> create your own Object.getOwnPropertyNames
  • Copy all properties from one object to another -> create your own Object.assign

Context is Everything

An entire lesson of JS120 is dedicated to context. I had a hard time grasping it at first, but eventually got the hang of it. Here are some things that helped me get there.

1. Simplifying this

The first step to understanding this is to know that its behavior is very simple if it isn’t part of a function definition. If this is not part of a function definition, then it always refers to the global object.

In the example below, this is passed as an argument to bind. It might look like this is part of the definition for the greetings method, but it isn’t — it’s not inside the definition’s braces. Since this is not part of a function definition, it refers to the global object. Even if this is used in an object, it will refer to the global object if it’s not inside a function definition. In this example,this.firstName and this.lastName will both be undefined, since this is referring to the global object, not the object john.

let john = {
firstName: 'John',
lastName: 'Doe',
greetings: function() {
console.log('hello, ' + this.firstName + ' ' + this.lastName);
}.bind(this),
};

Focusing first on this simple behavior should make the more complex behavior of this easier to understand. Any time this occurs outside of a function definition, its value is obvious. The majority of the time, this will be used as part of a function definition. In these cases, what this refers to depends entirely on how the function is invoked.

2. Understanding Context Loss

To understand context loss, try to answer the question “What are the ways that context can be lost, and how can context loss be prevented in these situations?” A complete response needs to clearly indicate the differences between “Implicit” and “Explicit” execution context.

My reference answer to this question can be viewed here. Eventually I got to the point where I could produce something like this extemporaneously, and at that point I felt pretty good about my knowledge of how context loss works.

3. Function Prototype Methods and Context

The JS120 “Functions and Execution Context” lesson covers the Function prototype methods of call, bind, and apply. These methods can be used to set the context of a function. Just like with Object methods, I found it helpful to reproduce their behavior with my own functions in order to fully understand how they work.

Choose Your Own Adventure with Object Creation Patterns

The idea here is that there are several ways to make objects in JavaScript, which are referred to as object creation patterns. The objects created using these patterns will generally behave in the same way, with some notable differences.

The assessment requires detailed knowledge of all of these object creation patterns, including how to implement them and their nuances. Needless to say, being able to demonstrate this knowledge with examples on the fly requires a lot of practice.

A good way to practice is to start from scratch and try to produce a functionally identical hierarchy of objects using each different object creation pattern. This practice is most effective if the hierarchy includes features such as inheritance, mix-ins, and polymorphism in order to illustrate how to implement these aspects in the different patterns.

Lacking any and all creativity, I usually practiced with something like creating a hierarchy of vehicles using Factory Functions, Objects Linking Other Objects, Constructor Functions, and ES6 Classes. Make sure your own examples are memorable so you don’t draw a blank during your assessment!

Applying Knowledge in Unusual Ways

Another area of focus listed for the assessment is applying knowledge to understand unusual situations. This was the part of the assessment that made me the most nervous. It’s a sort of paradox…impossible to prepare for because once you prepare for it, it’s no longer unusual.

There’s not much you can do other than accept that you are going to be caught off guard by something. Just like my advice for “Preparing for the JS109 Assessment”, the best way to be ready for this is to just know your stuff. Then it’s a matter of maintaining your composure while methodically working through an unusual situation. Easier said than done!

All that said, one thing that can help is to keep a running list of anything that seems unusual while going through the course materials. This list can be regularly reviewed to solidify understanding of these concepts. Doing this will build the mental framework that can be drawn from when evaluating an unusual situation during the assessment.

Here are some examples of things I took note of:

  • Use an object method to create and store a collaborator object— and then be able to reference that created object (see this exercise)
  • Unusual things about the new keyword
  • Unusual things about arrow functions
  • Pass a class as an argument and return a new object from a function

Everything Else

I touched on a few areas that I spent a lot of time with here, but that is definitely not everything I studied. As always, the kind of learning required to be successful at Launch School is circular — I also went through all the exercises and lessons several times to get ready, and extensively studied the material referred to by the study guide.

A Few Final Words About the Interview

I thought this interview was more difficult than JS109. In JS109, it was quite obvious that I was going to be given a small problem or two to solve and that I could solve them by following the problem solving methodology.

But when you are asked to explain a concept to somebody as if you were teaching them, there isn’t such a clear methodology to follow. One of the biggest dangers in this situation is explaining the wrong thing or explaining it in the wrong way, while missing the key concept.

In fact, something like that happened to me during my interview. I was asked a simple question, and I initially went off on a tangent which didn’t demonstrate the knowledge the interviewer was looking for. Even though I was able to recover, this less-than-ideal interaction threw me off balance for the rest of the call. In retrospect, spending time practicing some basic communication skills could have prevented this detour and helped me feel more confident for the rest of the discussion.

Here are some things you might consider doing during your interview to make sure you stay on track. You are expected to drive the conversation, and these can help drive the conversation in a favorable direction.

  • Just like the JS109 assessment, you will be using CoderPad, and you can use that like a whiteboard with JS comments. Before you start to explain a concept, you want to be sure you are on the same page as your interviewer. There’s nothing wrong with writing down what you think you were asked and asking the interviewer to confirm that you understood their question correctly. This might feel weird, but when the stakes are high I think it’s worth it to eliminate any miscommunications.
  • While going through your explanation, you can pause and ask something like “Is this making sense so far?” A good teacher will try to keep their students engaged after all, and the response to this question can prevent you from getting off track.
  • When you finish a demonstration, you can look back at the question you were asked (since you wrote it down) to quickly see if there’s anything you forgot to mention.

Finally, don’t forget that you are writing live code, and it needs to work. Test your code often! Use the node console to test things before you put them in your code! Practice using CoderPad before the interview! In general, don’t forget how you passed the JS109 interview — it all still applies!

Launch School

Publications of the Launch School Community

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store