CHALLENGE
const nums = [1, 2, 3];
const obj = { a: 1, b: 2, c: 3 };
function process(...args) {
const [first, ...rest] = args;
const { a, ...others } = obj;
return { first, rest, a, others };
}
const result = process(...nums);
console.log(result.first);
console.log(result.rest.length);
console.log(result.others.b);
console.log(Object.keys(result.others).join(''));
console.log(result.a === nums[0]);
❤1
What is the output?
Anonymous Quiz
24%
1 3 2 bc true
35%
3 2 2 bc true
17%
1 2 2 bc false
24%
1 2 2 bc true
❤4👍2🤔2