Blog 208

Jayswilder
1 min readAug 15, 2020

Interview questions

  1. Talk about something you learned this week.
    Lodash is a JavaScript library which provides utility functions for common programming tasks using the functional programming paradigm.
  2. Explain Function.prototype.bind()
    Bind creates a new function that will force the this inside the function to be the parameter passed to bind().
  3. Describe event bubbling.
    It relates to the order in which event handlers are called when one element is nested inside a second element, and both elements have registered a listener for the same event (a click, for example).
  4. What’s the difference between window load event and document DOMContentLoaded event?
    The DOMContentLoaded event fires when the document is loaded and the DOM tree is fully constructed. The load event fires when all subframes, images, stylesheets, scripts, etc have been downloaded.
  5. Describe the call-stack.
    The call stack maintains a record of the position of each stack frame. It knows the next function to be executed (and will remove it after execution). This is what makes code execution in JavaScript synchronous. Since the call stack is organized as a stack, the caller pushes the return address onto the stack, and the called subroutine, when it finishes, pulls or pops the return address off the call stack and transfers control to that address.

--

--