High Level Concepts Flashcards

1
Q

First Class Functions

A

Functions are treated as variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Single Threaded

A

One command is processed at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Event loop

A

Takes long running tasks, executes them in the background, and puts them back in the main thread once they are completed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Compilation

A

Entire codebase is converted into machine code at once, and written to a binary file that can be executed by a computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Interpretation

A

Interpreter runs through the source code and executes it line by line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Just-in-time Compilation

A

Entire code is converted into machine code at once, then executed immediately

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Web API’s

A

Functionalities provided to the engine, available on the window object. DOM, Times, Fetch…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Top-level code

A

All code outside of functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Global Execution Context

A

Default execution context stated when a file is loaded in the browser. All top-level code is executed here

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Execution context

A

The environment in which the javascript code is executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Call Stack

A

Place where execution contexts get stacked on top of each other, to keep track of where we are in the execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What Makes Up An Execution Context

A
  1. Variable environment
  2. Scope Chain
  3. “this” keyword
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Lexical Scoping

A

Defines how variable names are resolved in nested functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Scope

A

The accessibility or visibility of variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

3 Types of Scope

A

Global, function and block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Scope Chain

A

Used to resolve the value of variable names in javascript.

17
Q

Hoisting

A

Makes some types of variables accessible/usable in the code before they are declared

18
Q

Types of variables that are hoisted

A

function declarations, variables declared with var

19
Q

Temporal Dead Zone

A

Region of scope where a variable is defined but cannot be used

20
Q

Types of variables that are not hoisted

A

let and const variables, arrow expressions

21
Q

This keyword

A

Special variable created in every execution context. Takes the value of the owner.

22
Q

Primitive types

A

Number, string, boolean, null, undefined, symbol, bigint

23
Q

Remainder operator

A

Returns the remainder left over when one operand is divided by a second operand

24
Q

References the DOM object that dispatched an event

A

Target

25
Q

Statement used to skip an iteration in a loop

A

Continue

26
Q

What is null

A

The absence of a value

27
Q

What is eval()

A

The eval() function evaluates JavaScript code represented as a string.

28
Q

Defining default function parameters

A

function myFucntion(defaultValue = something) {}

29
Q

Is JavaScript able to pass by reference

A

No, only by value

30
Q

Higher Order Function

A

A function that receives another function as an argument

A function that returns a new function

31
Q

Function.prototype.call()

A

Calls a function with a given this value and arguments provided individually.

32
Q

Partial Application

A

Preset function parameters before being called

33
Q

Function.prototype.bind()

A

Creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.

34
Q

Closure

A

The closed-over variable environment of the execution context in which a function was created, even after that execution context is gone.

35
Q

Promise

A

An object that is used as a placeholder for the future result of an asynchronous operation.