Hello there, Need some help to crack up…

i am having doubt with array of iterator concept.

Here is my code.

const singers = [‘A’ , ‘B’ , ‘C’];

const best = => {

singer + ‘best in pop industry’;



As i looked at map method it should executes A is the best in pop industry and other continues but while its printing [ ‘A’, ‘B’, ‘C’ ]

.map() creates a new array, which you store in best variable.

so if you want to see the best singers in the pop industry, you need to log best. There is also a small problem with your .map(), but i will leave that for you to figure out :slight_smile:

Okay stetim94, thankyou for response I will try it now and let you know.

Thanks a lot for your support.

Hi Stetim94, I rechecked the code again what you said is right log to ‘best’ and i changed singer to member keyword after making these changes it worked well and i understood the concept of map method which gives result as array by executing a call back function.

As a beginner to learn JS and understanding it takes time for me but now i am getting the hang of it. :slightly_smiling_face:

// Right Code
const singers = [‘A’ , ‘B’ , ‘C’];

const best = => {

return member + ’ great in the world.’;



1 Like