Blog 208

David Hebert
1 min readNov 22, 2020

Talk about something that you learned this week.

We talked quite a bit about recursion this week. Recursion is basically taking a function that calls itself repeatedly, slowly getting closer to the condition you want it to meet. After the function is called enough times to meet the condition, it stops.

Explain Function.prototype.bind()

bind() allows a new function to be called, and has its this set to a specific value, which is declared in the function.

Describe Event Bubbling.

Event bubbling is what occurs when an DOM element is acted upon by a JS function. In event bubbling, the innermost element is acted on first by the event, and then the second most inner element, moving all the way out to the outermost element.

What’s the difference between the window load event and the DOMContentLoaded event?

DOMContentLoaded will start as soon as the document has been loaded, it will not wait for stylesheets, or images to load before starting, whereas the window load event will wait for everything to be loaded before running.

Describe the call stack.

The call stack is basically the DOM’s way of keeping track of what events to load and in what order.

--

--