16 lines
395 B
JavaScript
16 lines
395 B
JavaScript
function somethingAdvanced({topLeft: {x: x1, y: y1} = {}, bottomRight: {x: x2, y: y2} = {}}, p2, p3){
|
|
|
|
}
|
|
|
|
function unpackObject({title: title, author: author}) {
|
|
return title + " " + author;
|
|
}
|
|
|
|
console.log(unpackObject({title: "title", author: "author"}));
|
|
|
|
var unpackArray = function ([a, b, c], [x, y, z]) {
|
|
return a+b+c;
|
|
};
|
|
|
|
console.log(unpackArray(["hello", ", ", "world"], [1, 2, 3]));
|