module.exports = function getShortMessages(messages) {
function small_message(item)
{
return item.length < 50 ;
}
messages.map(function(message)
{
return small_message(message)
})
}
but when I test it I see a empty array as answer
Can someone explain where my thinking took the wrong path ?
Roelof
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/2bb9460e-96ef-4160-98e5-afe713f6ea96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/2bb9460e-96ef-4160-98e5-afe713f6ea96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAKGrCFhq%2BFFN655s2A4QbJ5fmPUK%3DNxOU1h9cxRAPsLekJkEYg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAKGrCFhq%2BFFN655s2A4QbJ5fmPUK%3DNxOU1h9cxRAPsLekJkEYg%40mail.gmail.com.
Also, you can pass the function as an argument directly:return messages.filter(small_message);
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/144D62D9-078A-43BA-8FE9-740E0859F5A1%40apigee.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/9da22225-5738-4517-bd9c-6284853a8b12%40googlegroups.com.