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.
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.