I couldn't find a better name.
Just a small idea of picking props off an object and smashing them into an array.
const person = {
age: 12,
name: "Ethan",
};
person.["age", "name"]; // [12, "Ethan"]
I've seen this idea that shows a similar way to get a subset of an object. If it will exist, why shouldn't this? I find it like having object destructuring but not array destructuring.
Any thoughts?
PS: I happen to have given the 400th post!
PS: I didn't use person["age", "name"]
because for some reason it happens to be valid JS.