What is a Spread Operator?
Front
Active users
6
All-time users
7
Favorites
0
Last updated
5 months ago
Date created
Nov 15, 2020
Unsectioned
(2 cards)
What is a Spread Operator?
Used to combine multiple arrays or objects with with the ...
EG.
list1=[a,n]
list2=[b,c]
combined = [...list1,...list2, 'anything else you want to add']
What is a class?
When there is an object with at least on method that will need to be re-used
class Person {
constructor(name){
this.name=name;
}
walk(){
console.log("walk")
}
}