/**
 * CH. 04 - Core JavaScript Object Creation & Design Patterns
 * ES6 Array Methods
 *
 * JavaScript Patterns - modern JS patterns with ES5 & ES6 examples
 * @copyright 2016 - 2017, Ahad Bokhari
 * license: MIT
 */

/* (i). ES6 brings with different methods that help your workflow. Over the years libraries like Underscore and then Lodash have polyfilled the features
 * lacking in the language, but now we have many more tools for the functional array.
 */

/* Array.from: long overdue method - Creates a new Array instance from an array-like or iterable object */

// a. array from stromg
Array.from('string');
// => ["s", "t", "r", "i", "n", "g"]

// b. array from Map
const arrayFromMap = new Map([[1, 2], [2, 4], [4, 8]]);
Array.from(arrayFromMap); 
// => [[1, 2], [2, 4], [4, 8]]

// b. entries()

// c. fill()

// d. find()

// e. findIndex()

// f. keys()

// g. values()

@@ -584,18 +584,18 @@
 from str
-om
+in
 g%0AArray.

Update es6-array-methods.js