0
let x = {
    a: 10,
    b: 20,
    c: 30
};

Is there any way to make only a,b keys of x as another object?

let y = x; //someway here through Object destructing

console.log(y); //{a:10,b:20}
Michał Perłakowski
  • 70,955
  • 24
  • 137
  • 155
Darshan Naik
  • 183
  • 1
  • 11

0 Answers0