How would I go about returning the key and the value to a string or a smaller object:
var whatIsInAName = [{ a: "a1", b: "b1" },{ a: "c1", b: "d1" },{ a: "e1", b: "f1" }];
returning something like: "a:a1"
I know about Object.values and Object.keys. Would it be some combination of this?
Object.entries()
?...Though I guess it's not official yet.Object.entries({foo:"FOO", bar: "BAR"});
This produces...[["foo","FOO"],["bar","BAR"]]
whatIsInAName
supposed to be the name of the function you want to return the key and value? Or is it supposed to be the object var name?