Back to Blog

A Quick Review Before Your Next Interview

July 25, 2020

Early this week I mentored a developer who was preparing their interview for a Frontend position. The session (1 hour) was so good that I thought my notes could help other developers, like you, who might not the chance to work with before their next interviews.

In this post you’ll learn about some JavaScript fundamental notions like IIFE, data structure, algorithm, design pattern, best practice, DB, Angular and TDD. We’ll finish our tutorial with some common questions asked on an interview

Let’s go!

Note
My mentee interview was not a coding one, just theory

A Quick Advise

You need to be yourself and speak naturally and professionally to your interviewer.

They are not interested in how strong you are at memorizing encyclopedic definitions but in your understanding of any concept you may be using or asked to explain.

JS Fundmental

IIFE

It is an acronym for Immediately-Invorded Function Expression.

What: a function that runs as soon as it is created
Why: protect the scope of the function and variables within it
Design Pattern: Self-Executing Anonymous Function

Let’s see an example of how to create such a function.

(() => {
    const greeting = "Hi"
    const name = "Abel"

    console.log(greeting + ' ' + name)
})()

Closure

inner function can still access parent function variables even after it is already executed.

counter = () => {
    let count = 0
    result = () => count += 1

    return result
}

const countValue = counter()
countValue() // 0
countValue() // 1
countValue() // 2

Prototypal Inheritance

Before talking about inheritance, let’s first understand what is a prototype.

A prototype is a (special) hidden property of objects. It is either null or reference another object.

[WIP]

this key-word

[WIP]

special object

its value depend on how the code is executed

Note:
We mostly always use this in the context of a function. But, in case it is used globally (i.e.: out of a function) this refers to the global object which is window in the browser and global in Nodejs.

Promise & asyn/await

Data structure

Algorithms

If you want to learn more, I share with you some of the useful references I used.

References