When I loop, you loop, we loop

  1. Describe one thing you’re learning in class today.

The “for of” loops are for iterable, while the “for in” loop is for objects.

2. Difference between: function Person(){}, var person = Person(), and var person = new Person()?

All three appear to be dealing with object constructors, but in different ways. the first is a function using an object, the second is a variable calling the function object and the third is creating a new object within the variable.

3. What’s the difference between an “attribute” and a “property”?

Properties are the value associated with an object are are retrievable for use. Like if you have a house, the house has variables associated within it. The houseColor = white, the houseRoom = 6. The house itself is the object, but the variables associated with the house is its properties.

While attributes, as associated with the elements listed within your HTML tags, such as class, id or href. So to keep with the house analogy, since these are located in your HTML, this is where your house is located on your map. It what it may be identified as ‘my house’, with a class of ‘tutor-style’ or ‘ranch-style’.

4. What language constructions do you use for iterating over object properties and array items?

You would use a for in loop to iterate over object while you would use a for of loop to iterate over the array of an item. You can still use the for loop itself, but it may not return the results you want.

5. What is the event loop?

The event loops is a method by which javascript appears to be synchronous, when it is in fact a way to manage tasks through the stack.

6. What is the difference between call stack and task queue?

The stack is executes the code as it is received, while the task queue will manage including or dependent code from APIs. Your task queue will not run until your stack is empty.

7. What are the differences between ES6 class and ES5 function constructors?

A majority on the function constructors appear to be ways to expedite your code. Many of the functions of ES6 code can be found in essential ES5, but will take longer to write. Such as the for loop having the option now of using the forEach instead of the for loop.

--

--

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
N.Kendrick

A Full Stack Developer. Remember, write the documentation you with you had had when you started your project. https://highermay.dev/