更短的函数 varmaterials=['Hydrogen','Helium','Lithium','Beryllium'];materials.map(function(material){returnmaterial.length