Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Eugene Lee
Eugene Lee
11,890 Points

creating new array to display abbreviated days on javascript reiteration

i don't know why am i getting response such as it's not a function. it's javascript reiteration challenge. my code is : abbreviatedDays=daysOfWeek(day=>day.slice(0,3)); console.log(abbreviatedDays);. then i get message such as it's not function. am i overlooking anything. thanks for any help

2 Answers

I believe you're missing the map method on daysOfWeek.

abbreviatedDays = daysOfWeek.map(day => day.slice(0, 3));