Open hello2jolee opened 3 years ago
const days = ["MON", "TUES", "WED"]
const otherDays = ["THU", "FRI", "SAT", "SUN"]
const allDays = [...days, ...otherDays]
console.log(allDays) // output : ["MON", "TUES", "WED", "THU", "FRI", "SAT", "SUN"]
const ob = {
first: "hi",
second: "hello",
}
const ab = {
third: "bye bye"
}
const two = { ...ob, ...ab }
console.log(two) // output : Object {first: "hi", second: "hello", third: "bye bye"}
Object Destructuring