i’m not 100% sure what an empty callback function is supposed to look like in this case. Should it look like this? : ()=>{}.
Yes that’s correct.
2.i need to assign that which is being mapped to playersCards.innerHTML but how do i do this when the parameter is empty?
It doesn’t really matter if it’s “empty” or not. But right now in your code, instead of assigning the new array to playerCards.innerHTML. You tried to assign playerCards.innerHTML to arr.
As you stated in your first question you indeed need to only add an empty callback function in the map method.
Then once you’ve done that. You will to use the += (addition assignment) operator to assign this to playerCards.innerHTML.
what is the ‘this’ you are referring to? that is what i am stuck on. that’s why i assigned it to arr, because i have no idea what exactly i am supposed to be assigning playerCards.innerHTML to!
thanks everyone. i finally figured it out. i was struggling to remember that you can set an empty function equal to an element. that still seems weird to me. i don’t fully understand it but i think i need to just accept the idea and move on lol
Also, it would be very very very nice if the instructions alluded to the fact that the map array is not going to stay empty, that in the following steps we are going to populate the empty callback function. it just seems weird and bad code to set up an element equal to an empty callback function.