#266
New
javascript "interview" concepts
Reported by Volkan Ozcelik on JavaScript: from Zero to Hero · 22/07/2018 22:20:46
- Assigned to:
- Volkan Ozcelik
- Priority:
- Normal
- Status:
- New
- Category:
- Lessons
- Version:
- None
as far as I can tell, the things that I’ll cover here are the most frequently brought up questions aside from the usual fizbuzz, traverse binary tree, backtrace a maze, dial a phone number kinds of stupid algorithm question that do not measure anything but people still keep on asking and asking
You can sharpen your algorithm skills by losing time on sites like leetcode (to me, again, is a waste of time, but the industry does not think like me, though it’s beginning to change — so who knows :) ).
I’ll explain the rest of the stuff that is actually necessary, and that you actually will be using in your day-to-day job
Concepts
Value vs. Reference — Understand how objects, arrays, and functions are copied and passed into functions. Know that the reference is what’s being copied. Understand that primitives are copied and passed by copying the value. Scope — Understand the difference between global scope, function scope, and block scope. Understand which variables are available where. Know how the JavaScript engine performs a variable lookup. Hoisting — Understand that variable and function declarations are hoisted to the top of their available scope. Understand that function expressions are not hoisted. Closures — Know that a function retains access to the scope that it was created in. Know what this lets us do, such as data hiding, memoization, and dynamic function generation. this — Know the rules of this binding. Know how it works, know how to figure out what it will be equal to in a function, and know why it’s useful. new — Know how it relates to object oriented programming. Know what happens to a function called with new. Understand how the object generated by using new inherits from the function’s prototype property. apply, call, bind — Know how each of these functions work. Know how to use them. Know what they do to this. Prototypes & Inheritance — Understand that inheritance in JavaScript works through the [[Prototype]] chain. Understand how to set up inheritance through functions and objects and how new helps us implement it. Know what the proto and prototype properties are and what they do. Asynchronous JS — Understand the event loop. Understand how the browser deals with user input, web requests, and events in general. Know how to recognize and correctly implement asynchronous code. Understand how JavaScript is both asynchronous and single-threaded. Higher Order Functions — Understand that functions are first-class objects in JavaScript and what that means. Know that returning a function from another function is perfectly legal. Understand the techniques that closures and higher order functions allow us to useand maybe some more too.
This can deserve its own section maybe.
Attachments
No attachment has been uploaded, yet.
Loading comments...