If I want to create an array from something other than an array, such as a string, or an object of a constructor other than that of Array there are a number of ways of doing so. There is of course the Array.from static method that will work okay with array like objects, however it will not always work out so great in other situation.
The array from static method can be called off of the Array global, and then an array like object can be passed as the first argument. As long as the object is formated like an array it should work okay and what will be returned is an array with all the prototype methods of an array like array map.
There are some draw backs with this though so lets look at some additional options for creating an array from something other than an array.
The Object value static method will return an array of values for the object that is passed to it. So it is another way of creating an array from an object. What is great about this is that it will create arrays just fine with objects that have named key values without a length property.
The string split method comes in handy if there is a static separator between each item in a string that i want to become an element in an array.
The string match method is yet another option for creating a new array from a string, assuming that you have some knowledge of how to work with regular expressions.
So in an above section I covered the Object values static method that can create an array from an object with named key names, but what if I want an array of key names rather than values. This is where the Object keys static method can come into play.