v Flashcards

1
Q

What is the difference between var and let and const

A

let has a block scope.
const has a block scope.var has a function scope, not a block scope.

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

what does .map() do?

A

The .map() method allows you to run a function on each item in the array, returning a new array as the result.

In React, map() can be used to generate lists.

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