Converting an array-like object to an array using Array.prototype.slice

Question | May 14, 2017 | nextptr 

The numMap object has some numeric key properties and a length property:

var numMap = {
  '0': 'Zero',
  '1': 'One',
  '2': 'Two'
};

numMap.length = 3;

'numMap' is not an array. However, the numeric key properties and a property (length) that has the count of numeric properties makes numMap an array-like object. The concept of array-like object is quite significant in JavaScript. One such object in JavaScript is arguments that is available to all functions. You should read more about it in Explanations once you answer this question.

What would be the result numbers of calling Array.prototype.slice as follows?

var numbers = [].slice.call(numMap);