Chunky Monkey // For some reason I can' t run it

Tell us what’s happening:

Your code so far

function chunkArrayInGroups(arr, size) {

  var temp = [];
  var result = [];

  for (var a = 0; a < arr.length; a++) {
    if (a % size !== size - 1)
    else {
      temp = [];

Your browser information:

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

Link to the challenge:

2 things.

  1. you are missing a closing brace }
    • look at the FCC editor and you should see a red squiggly line. Whenever you see that, there is a syntax error. Hover over it to see what it expects.
    • keep in mind that sometimes the error actually happens a few lines before the error shows.
  2. you are not returning anything from your function