Skip to content

Tag: arrays

Got undefined in map result

I’m having trouble converting, summing, and sorting the following arrays into key and value objects Data Array my current code and the result of my current code though, the result I want is like this Answer Map.prototype.set() only takes 2 arguments, you’re passing 3. If you want to store multiple…

Dynamically Find Values from a Variable

Please can you help me try figure out how to dynamically check if a sentence includes any values that another variable includes and count that value. You can see that I have had to create a singular variable for each of the words that are part of the string for variable – overUsedWords in order to be ab…

Order an array of objects based in other array values

Lets say I have an array of products: and I have another, smaller array where I store the order of the products on my page: And I want my Products array in such a way they are ordered like the orderItems array defines, like so: and I want the products who do not have a corresponding orderItem to be at