Hi all,
I hope somebody can help , I really appreciate it.
I’ve been stuck on this challenge for a bit too long now.
My solution seems to return the correct result, but still it will not pass.
Is it not returning the wrong type of object or such ?
Any help would be great, I really want to solve this on my own , and so want to see why my code won’t pass.
Thanks
ratings= watchList.map(index =>{
return ("{title:" + index.Title +"," + "rating:" + index.imdbRating + "}");
// return ("{title:" + Object.values(index.Title) +"," + "rating:" + Object.values(index.imdbRating) + "}"); also seems to work
});
// I added the second return, as I've tried a lot and none seem to be what's wanted
Challenge: Use the map Method to Extract Data from an Array
i dont know why you are appending stuff? there is no need for you to do this, you can just do a normal object like return { title: title, rating: rating }