Once I find the “false” and “true” values of my array items using "startsWith(), how can I connect the “true” values to the correspondents strings in the original array and therefore print the desired result?
The array has [Parrots,Falcons,Emus,Caracaras,Egrets]
and after running:
const map1 = birds.map(bird => ${bird.startsWith("E")}
);
//output:false,false,true,false,true
and I would like to print only the “true” values which are correspondent to “Emus” and Egrets.
Please see the hard coded solution link bellow, in case of many values this isn’t good, I would like a more effective way to solve this.
code link:
A link to the actual task or assessment page:
Thanks for all the help!!!
Regards,
Dan