search

Home  >  Q&A  >  body text

+怎么连接多个内容,这个有点混乱?

素颜素颜2994 days ago931

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:31:25

    + How to connect multiple contents, this is a bit confusing? - PHP Chinese website Q&A - + How to connect multiple contents, this is a bit confusing? - PHP Chinese website Q&A

    Take a look around and learn.

    reply
    0
  • 迷茫

    迷茫2016-12-22 10:44:48

    计算机拼接字符串的实现,其实是开辟了一个动态的字符串数组,当你用+号连接多个字符串,就是把一个个字符串加入数组,所以字符串加 +字符串,就是直接相连接。:例如

    document.write("a"+"b");//ab

    如果是变量+变量,也是把变量的值写入到了数组,但此时数组内部存储的是你变量表达的东西,如果是数的话,其结果是加和,而不是例如上面字符串的拼接,原因是字符串一旦创建,就不能毁灭,所以字符串只能拼接,而数可以加和


    reply
    1
  • Cancelreply