Chunky Monkey challenge

Hi. I don’t understand, why does the variable “result” takes a numeric value.

function chunkArrayInGroups(arr, size) {
 var a=size;
  var arr1 = arr.slice(0, a);
  var result=[];
 result=result.push(arr1);
  var b= a+size;
   arr1 = arr.slice(a, b);
    result =arr1.push(arr1);
   var c = b+size;
   arr1 = arr.slice(b, c);
 result =arr1.push(arr1);
   return result;
}
chunkArrayInGroups(["a", "b", "c", "d"], 2);

With cycle for also returns a numeric value

function chunkArrayInGroups(arr, size) {
  var result=[];
for (var i =0; i<arr.length; i++)  {
 var arr1 = arr.slice(0, size);
  result =result.push(arr1);
  return result;
}
 
}

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 YaBrowser/19.9.3.315 Yowser/2.5 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/chunky-monkey/

the push method returns the new length of the array, so you are pushing arr1 to result and then assigning the returned value, which is a number, to result, so result becomes a number

Prompt, please, how it is possible to insert an array in an array?

the push method will let you add to the end of an array anything, also an other array.
Your issue is that assigning the returned value you are overwriting the value of the variable. The returned value is the new length of the array, which you are not interested in, so just don’t assign the returned value to anything