js Flashcards

1
Q

Closures

A

an inner function that has access to the outer (enclosing) function’s variables—scope chain

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

Constructor

A

special method for creating and initializing an object created within a class

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

Destructuring Object

A

JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.

var instructor = {
    firstName: "Elie",
    lastName: "Schoppik"
}

var {firstName:first, lastName:last} = instructor

first; // “Elie”
last

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

Expressions

A

Produces value

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

Declaration(statement)

A

Performs an action

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

Inheritence

A

https://hackernoon.com/inheritance-in-javascript-21d2b82ffa6f

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

Side Effects

A
any interaction with the outside world from within a function.
NO SIDE EFFECTS
function priceAfterTax(productPrice) {
 return (productPrice * 0.20) + productPrice;
}
SIDE EFFECTS
var tax = 20;
function calculateTax(productPrice) {
 return (productPrice * (tax/100)) + productPrice; 
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Rest Operator

A

used to get the arguments list passed to function on invocation and in array destructur

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

Spread Operator

A

fills the function invocation arguments with values from an array

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

Strict Mode

A

Deleting a variable, a function, or an argument will result in an error
No More Auto Global Variable Declaration.

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

Classes

A

creates an object that is linked to a prototype. Changes to that prototype propagate to the new object, even after instantiation.

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

Super

A

The super keyword is used to access and call functions on an object’s parent.

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

‘new’

A

creates an instance of a user-defined object type or of one of the built-in object types that has a constructor function

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

Recursiomn

A

the ability to call a function from within itself.

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

Primitives

A
Boolean
Null
Undefined
Number
String
Symbol (new in ECMAScript 6)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Object

A

collection of properties, and a property is an association between a name (or key) and a value.

17
Q

Regular expressions(regex)

A

patterns used to match character combinations in strings

18
Q

arrow functions

A

a function expression and does not have its own this, arguments, super, or new.target.

19
Q

Promise

A

Object that represents a task that will be completed in the future.

20
Q

Method

A

A JavaScriptmethodis a property containing afunction definition.

21
Q

Properties

A

The values associated with a JavaScript object.