From 35501c48bcee88244ce4a56b7e057df40a29a0da Mon Sep 17 00:00:00 2001 From: Dalton Rooney Date: Sat, 19 Dec 2015 17:22:00 -0800 Subject: [PATCH] Add array.slice() to Chunky Monkey I think it would be helpful to include a link to the Array.slice() docs here, since it's important to the solution and it's the first time it appears in a Bonfire. --- .../01-front-end-development-certification/basic-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/01-front-end-development-certification/basic-bonfires.json b/challenges/01-front-end-development-certification/basic-bonfires.json index 8bcf140f5b..859042ef88 100644 --- a/challenges/01-front-end-development-certification/basic-bonfires.json +++ b/challenges/01-front-end-development-certification/basic-bonfires.json @@ -548,7 +548,8 @@ "assert.deepEqual(chunk([0, 1, 2, 3, 4, 5], 4), [[0, 1, 2, 3], [4, 5]], 'message: chunk([0, 1, 2, 3, 4, 5], 4) should return [[0, 1, 2, 3], [4, 5]].');" ], "MDNlinks": [ - "Array.push()" + "Array.push()", + "Array.slice()" ], "solutions": [ "function chunk(arr, size) {\n var out = [];\n for (var i = 0; i < arr.length; i+=size) {\n out.push(arr.slice(i,i+size));\n }\n return out;\n}\n\nchunk(['a', 'b', 'c', 'd'], 2);\n"