I have an ideal that why we don't make Object in nodejs can Extract.
This look like
const object = { a : "a", b : "b"};
console.log(...object);
//print: a b
That mean we extract object to a list of property and value
Thank for reading.
Have Fun Coding.
Sorry if it existed. Could you share me if it exists?
Spread operator for Objects is available only in Object literals:
You can get the needed result in this way:
const object = { a: "a", b: "b" };
console.log(...Object.values(object));
// print: a b
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values
Thanks for asking @kitokip! I think @vsemozhetbyt answered the question: This would be a language-level feature (ES6), not something that has to do with node. Closing as answered.