If the given value is present in a particular key i.e. "color" in our case return the "index" otherwise return "-1" Let's say we have the following array of objects: const colorSet = [ { color: "red", value: "#f00" }, { color: "green", value...
blog.whoisnikhil.com2 min read
No responses yet.