1st was easy it was just a add function but with n number of args:
eg; add(args)
add (1, 200
add(1,2,4,5)
2. Second was bit tough I was not to figure out the solution
const items = [
{ type: 'phone', name: 'iPhone', color: 'gold' },
{ type: 'laptop', name: 'Chromebook', color: 'gray' },
];
const excludes = [
{ k: 'color', v: 'gold' },
{ k: 'color', v: 'silver' },
{ k: 'type', v: 'tv' },
];
const filteredItems = applyFilters(items, excludes);
console.log(filteredItems);
items should be filtered based on excludes k and v value.