Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
339 views
in Technique[技术] by (71.8m points)

求解js语法糖 ...的含义

 * [['hello'],['world','1','2']]
 * => [Array(1), Array(3)]
 * [['hello'],...[].slice.call(['world','1','2'], 0)]
 * => [Array(1), "world", "1", "2"]
 * [...['hello'],...[].slice.call(['world','1','2'], 0)]
 * => ["hello", "world", "1", "2"]
 

可以看出,加语法糖 ... 之后的作用。但我水平有限,在网上找不到关于 ... 的资料,有没有大神解释一下。有资源更好。谢谢。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...