JavaScript
31.9K subscribers
1.01K photos
9 videos
33 files
691 links
A resourceful newsletter featuring the latest and most important news, articles, books and updates in the world of #javascript 🚀 Don't miss our Quizzes!

Let's chat: @nairihar
Download Telegram
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
4👍2🤔2