What i want to know is why did mine not work? I followed the reasoning from other sites that were teaching on how to use the map function and honestly i dont know how that led to the answer above. This is what i got:
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.
Note: Backticks are not single quotes.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
Here, each element of array watchList is considered as x once as the map function loops through the array.
Now, since element of array watchList is an object, we use dot notation.