Javascript ES6 Flashcards

1
Q

function that allows a short syntax for writing function expressions.

A

Arrow Function
hello = () => {
return “Hello World!”;
}

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

The statement that allows you to declare a variable with block scope.

A

let

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

The statement that allows you to declare a variable with a constant value

A

const

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

A type of function, but instead of using the keyword function to initiate it, we use a different keyword, and the properties are assigned inside a constructor() method.

A
Class
class Car {
  constructor(brand) {
    this.carname = brand;
  }
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Giving function parameters default values

A
function mine(x, y = 10) {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Array method that returns the value of the first array element that passes a test function

A
find()
var numbers = [4, 9, 16, 25, 29];
var first = numbers.find(myFunction);
function myFunction(value, index, array) {
  return value > 18;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Array method that returns the index of the first array element that passes a test function

A
findIndex()
var numbers = [4, 9, 16, 25, 29];
var first = numbers.findIndex(myFunction);
function myFunction(value, index, array) {
  return value > 18;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Number property that represents the difference between 1 and the smallest floating point number greater than 1. It has the value of 2.2204460492503130808472633361816E-16, or 2-52.

A

Number.EPSILON

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

Number property that represents the minimum safe integer in JavaScript (-(2^53 - 1))

A

Number.MIN_SAFE_INTEGER

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

Number property that represents the maximum safe integer in JavaScript (2^53 - 1)

A

Number.MAX_SAFE_INTEGER

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

Number method that determines whether the passed value is an integer

A

Number.isInteger()

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

Number method that determines whether the passed value is a safe integer

A

Number.isSafeInteger()

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

Global Number method that determines whether the passed value is a finite number

A

Number.isFinite()

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

Global Number method that determines whether a value is NaN (not-a-number)

A

Number.isNaN()

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

Exponentiation operator to raise the first operand to the power of the second operand and produces the same result as Math.pow()

A

**

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