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


Use the 'splice' method to replace "quick" and "brown" from the 'saying' array and add "slow" and "red" in their place in that order.

saying.splice(1,2,["quick","brown"]); creates the array which was asked for but doesn't pass the challenge.

1 Answer

Mike Bronner
Mike Bronner
16,395 Points

The splice method doesn't take an array as an argument. Instead, it is formatted as such:

array.splice(index, numberOfItemsToRemove, item1, item2, item3, ..., itemN);

Merry Christmas! :) ~Mike

James Barnett
James Barnett
39,199 Points

To add to Mike Bronner's answer, here's some good documentation on using the splice method