function findShort(s){ return Math.min(...s.split(" ").map (s => s.length)); }var p1 = findShort("bitcoin take over the world maybe who knows perhaps"); //3var p2 = findShort("turns out random test cases are easier than writing out basic ones") //3console.log(p1); //3console.log(p2); //3找出最短的長(zhǎng)度的字符串,這里的...起到什么作用?這好像不是類數(shù)組把。。
關(guān)于es6的問(wèn)題
Qyouu
2018-08-29 14:34:55