Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

three dots in javascript

// Extracts elements in Dict
let team = {
    lead: "Bob",
    num2: "Rob",
    num3: "Dog",
}
// team
{lead: "Bob", num2: "Rob", num3: "Dog"}

let students = {
    num1: "Andy",
    num4: "Ben",
    ...team
}
//students
{num1: "Andy", num4: "Ben", lead: "Bob", num2: "Rob", num3: "Dog"}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dots #javascript
ADD COMMENT
Topic
Name
1+6 =