timoxley/functional-javascript-workshop

exercises basic_filter

caoxiaoshuai1 opened this issue · 2 comments

why the code below can't pass the workshop, I test it in other way but it works.

function getShortMessages(messages) {
   // SOLUTION GOES HERE
     return messages.filter(function(item) {
    return item.length < 50
  }).map(function(item) {
    return item
  })
 }

 module.exports = getShortMessages

What's that second .map doing? What is the structure of the expected result

it's my fault, I misread the task