Home  >  Q&A  >  body text

jquery源码合并数组的问题?

0000.png

var len = +second.lenght; //这个加号的作用是什么?,去掉+号也可啊


素颜素颜2746 days ago1878

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-10-01 00:50:47

    The problem of merging arrays with jquery source code?-PHP Chinese website Q&A-The problem with merging arrays with jquery source code?-PHP Chinese website Q&A

    Look around and learn.

    reply
    0
  • 迷茫

    迷茫2017-03-15 09:04:21

    +second.length中, 若second.length为数字型的字符串, 如"123", 将会被转换为123(number类型), 若为非数字型字符串,将会被转换为NAN.

    这是JS中的一种特殊写法!


    reply
    0
  • Cancelreply