Class 6 — Prompt 203

Chuy
2 min readJul 14, 2021
  • Describe one thing you’re learning in class today.

DOM Manipulation, the upside down tree or document object model. The DOM defines a standard for accessing documents

  • What’s the difference between: function Person(){}, var person = Person(), and var person = new Person()?

function person () {} is a function declare with the word person

var person = It is a variable that will hold a value according what is place after the equals sing

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

Attributes are defined by HTML. Properties are defined by the DOM. The value of an attribute is constant. The value of a property is variable.

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

The for...in statement iterates over all enumerable properties of an object that are keyed by strings (ignoring ones keyed by Symbols), including inherited enumerable properties.

  • What is the event loop?

The event loop is the secret behind JavaScript’s asynchronous programming. JS executes all operations on a single thread, but using a few smart data structures, it gives us the illusion of multi-threading.

  • What is the difference between call stack and task queue?

So in short, a job queue is a queue of things to do (usually stored persistant) and a call stack is a stack of routines. A job would have variables assigned to it, and a call stack would be the abstract implementation. So a job could “call” a method from a call stack

  • What are the differences between ES6 classes and ES5 function constructors?

ES6 class basically does the work of defining a new object and appending functions to its prototype. ES5 Function constructors work and look the same but the main difference is observed when the developer uses the Inheritance property. … ES5 function constructors focus on how the objects are instantiated

ES5 has a lower performance as compared to ES6.

--

--