javascript - 数组reverse()后再join()的问题?
PHPz
PHPz 2017-04-10 13:11:29
0
2
686

为什么数组在reverse()后再join()后有两种情况?

var x=['l','o','v','e']
x.reverse().join();   // 'e,v,o,l'
x.reverse().join('')  // 'love'

这是什么原因?

PHPz
PHPz

学习是最好的投资!

reply all(2)
数据分析师

javascript - What is the problem with array reverse() and then join()? - PHP Chinese website Q&A -javascript - What is the problem with array reverse() and then join()? - PHP Chinese website Q&A

Take a look around Oh, study it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template