es6-examples Arrow Functions var colors = ["red","green","blue"]; var newColors = colors.map(color => color.length); newColors // returns [3, 5, 4] var colors = ["red","green","blue"]; var newColors = colors.map(color => color[0]); newColors // returns ["r", "g", "b"]