Skip to content

Instantly share code, notes, and snippets.

@andilabs
Created September 8, 2017 13:54
Show Gist options
  • Save andilabs/17a4485613951875c25f2f44478b719d to your computer and use it in GitHub Desktop.
Save andilabs/17a4485613951875c25f2f44478b719d to your computer and use it in GitHub Desktop.
var materials = [
'Hydrogen',
'Helium',
'Lithium',
'Beryllium'
];
materials.map(function(material) {
return material.length;
}); // [8, 6, 7, 9]
materials.map((material) => {
return material.length;
}); // [8, 6, 7, 9]
materials.map(material => material.length); // [8, 6, 7, 9]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment