Skip to content

Latest commit

 

History

History
159 lines (43 loc) · 3.97 KB

goldposts.md

File metadata and controls

159 lines (43 loc) · 3.97 KB

1. To Know by Heart As Soon As Possible(!)

How do you call a function? (Equivalently, how do you refer to a function without calling it?)

How do you store the returned result of a function in a variable?

An object literal is written enclosed with _______. Each key is followed by a _______ which is followed by the value for that key, and key-value pairs are separated by _______.

An array literal is enclosed with _______. Elements of an array are separated by _______.

What exactly do we mean by "literal" anyway?

To access a property or method of an object, we write the name of the object followed by _______, and then the name of the property or method we want.

How would you access the ith element of the array referenced by the variable arr?

What is the difference between returning a value from a function and console.logging that value within the function?

2. To Probably Know More or Less by Heart by the End of Gold Badge

What is the difference between an expression and a statement?

What is the difference between undefined and null?

Provide a few examples of Boolean operators along with examples of how we might use them.

How does the ternary operator work and what is its chief use case? (There is a right answer to this question. It might help you to ask: what makes a ternary different from an if-then-else?)

What is the difference between a for-in and a for-of loop?

How does the .map array method work? (Other array methods like .filter and .every are important to know as well but .map is the one you will need to be fluent in.)

Describe how JavaScript evaluates a chained expression like str.split('-').reverse().join('_'). (I'm not asking for a description of what this code does as much as a step-by-step analysis of how it is read and executed. What part is evaluated first, and then second and so on? What objects are the methods attached to?)

What is the "implied return" or "concise body" form of an arrow function expression?

What is the DOM? (Don't memorize this definition, I would rather you understand the gist of it and be able to explain it in your own words, even if it's vague or incomplete.)

What are some methods to access existing elements on a page as JS objects?

Describe the process of creating new elements and attaching them to the page using JavaScript.

What are the two arguments we can provide when calling the fetch function? (Bonus: under what circumstances can we omit the second argument completely?)

Describe what a promise is and give a basic overview of how they work. Why do they exist in the first place?

Every promise has a .then method. What kind of argument does this method expect, and what does .then do with it?

What is the purpose of the .catch method?

What does the await keyword do? Where are we allowed to use it?

Describe what an event listener is, how to set one up, and the kinds of events one might want to listen for. (Feel free to rely on a common example here if that helps.) Bonus: how do we remove an event listener?

3. To Be Reasonably Comfortable With by the End of Gold Badge (Even If You Have to Look It Up)

In which cases would you call a function and ignore its returned value (in particular, not storing the result in a variable)?

How is a piece of JSON different from the JavaScript representation of the same data?

What is a callback?

What is Node.js? Why do we use it?

Provide two or three examples of places in JavaScript where we might encounter undefined instead of an outright error.

How does array spreading work (i.e. the ... syntax)? What are a few ways this feature can be used?

Likewise, how does object spreading work, and where does it come in handy?

3. To Be Aware Of Peripherally

How can we create a string representing a given JavaScript object in JSON format?

How does a while loop work?

Is there any way to specify that a variable must be of one specific type (without making it a constant)?