GUIs

Austin Skrobarczyk
2 min readSep 2, 2020
  1. Describe one thing you’re learning in class today.

Today in class we reinforced how to create elements directly from JavaScript from the DOM . Which we learned in Web 101.

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

The first example is a function, while the other two are variables. Var person = Person (), is making a variable called person and making it equal to the returned product of function called Person. While the second variable creates a new instance of an object based on the Person function. So the variable (person) is now an Object, not just a string or a number.

3. What is the difference between “attribute” and “property”?

An attribute checks the status of something. A property is inherent to the item being checked.

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

You can use for loop, for..in, for each..in, map, reduce to iterating over object properties and array items?

5. What is the event Loop?

JavaScript code runs single-threaded. There is just one thing happening at a time.

This is a limitation that’s actually very helpful, as it simplifies a lot how you program without worrying about concurrency issues.

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

So in short, a job queue is a queue of things to do 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.

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

ES6 class allows the developers to instantiate objects using the new operator. 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.

--

--