Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var a = [
"Hydrogen",
"Helium",
"Lithium",
"Beryl­lium"
];
var a2 = a.map(function(s){ return s.length });
var a3 = a.map( s => s.length );
//上記a2 a3の結果は同じ
//配列で"[8, 6, 7, 10]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.