Closed arrested-developer closed 5 years ago
https://github.com/FACxBeamery/Week3-toDoList-Thomas-Tom/blob/a33ce1cffc4c4ed6606165ac1f1f76441e584cbc/src/handler.js#L23
A little test on the node REPL tells me that your output here might not be what you expected. Did you want to return two arrays within another array?
Take a look at the concat array method. You could also flatten each array using the spread operator
concat
var parts = ['shoulders', 'knees']; var lyrics = ['head', ...parts, 'and', 'toes']; // ["head", "shoulders", "knees", "and", "toes"]
Thanks for raising this issue - we're thinking of keeping this structure for now as it means the two parts will be easy to extract (e.g. for filtering out incomplete items), but we'll bare it in mind!
https://github.com/FACxBeamery/Week3-toDoList-Thomas-Tom/blob/a33ce1cffc4c4ed6606165ac1f1f76441e584cbc/src/handler.js#L23
A little test on the node REPL tells me that your output here might not be what you expected. Did you want to return two arrays within another array?
Take a look at the
concat
array method. You could also flatten each array using the spread operator