# Needing Help on "Chunky Monkey" Coding Lesson

Tell us what’s happening:
im so confused please help me, my code is not working

Your code so far

``````      function chunkArrayInGroups(arr, size) {
return arr;
}

chunkArrayInGroups(["a", "b", "c", "d"], 2);

function mutation(arr) {size
var test = arr[1].toLowerCase();
var target = arr[0].toLowerCase();
for (var i = 0; i < test.length; i++) {
if (target.indexOf(test[i]) < 0) return false;
}
return true;
}

function chunkArrayInGroups(arr, size) {
return arr;
}

chunkArrayInGroups(["a", "b", "c", "d"], 2);

function mutation(arr) {size
var test = arr[1].toLowerCase();
var target = arr[0].toLowerCase();
for (var i = 0; i < test.length; i++) {
if (target.indexOf(test[i]) < 0) return false;
}
return true;
}
``````

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.60`.

Challenge: Chunky Monkey

Link to the challenge:

this is the function executed by the tests, it doesn’t seem you ahve done anything with it

``````function chunkArrayInGroups(arr, size) {

return arr;

}

chunkArrayInGroups(["a", "b", "c", "d"], 2);

function chunkArrayInGroups(arr, size) {

var temp = [x];

var result = [];

for (var a = 0; a < arr.length; a++) {

if (a % size !== size - 1) temp.push(arr[a]);

else {

temp.push(arr[a]);

result.push(temp);

temp = [];

}

}

if (temp.length !== 0) result.push(temp);

return result;

}
``````

Once i type it in it says “Syntax Error” so i dont know what to do…

do you mean this one?

``````SyntaxError: unknown: Identifier 'chunkArrayInGroups' has already been declared
``````

at it says, you have the `chunkArrayInGroups` function declared twice, which results in a syntax error

or something else? if it’s somethign else please paste the whole error

i got the answer thanks for your help!