66beta
V2EX  ›  问与答

这是 Chrome 的 Console 的 bug 吗?

  •  
  •   66beta · Mar 6, 2015 · 3095 views
    This topic created in 4283 days ago, the information mentioned may be changed or developed.
    
    Supplement 1  ·  Mar 6, 2015
    第二行代码执行后,返回的不对,所以是chrome的bug吧?
    Supplement 2  ·  Mar 6, 2015
    低级错误,此帖完结,谢谢解答
    10 replies  •  2015-03-06 13:11:05 +08:00
    timonwong
    timonwong
    Mar 6, 2015
    1
    The concat() method ******returns a new array****** comprised of the array on which it is called joined with the array(s) and/or value(s) provided as arguments.
    iyaozhen
    iyaozhen
    Mar 6, 2015
    2


    b = b.concat("111");
    iyaozhen
    iyaozhen
    Mar 6, 2015
    3


    补个图
    otakustay
    otakustay
    Mar 6, 2015
    4
    在你执行第一行前b的内容是啥?
    66beta
    66beta
    OP
    Mar 6, 2015
    6
    @otakustay 都在了
    66beta
    66beta
    OP
    Mar 6, 2015
    7
    @timonwong function知道,但是返回的不对啊,所以是不是算chrome的bug?
    otakustay
    otakustay
    Mar 6, 2015
    8
    @66beta 都在了是啥意思,至少没看到你声明b的代码啊?
    66beta
    66beta
    OP
    Mar 6, 2015
    9
    @otakustay 嗷,骚瑞,第一句是 b = [];
    66beta
    66beta
    OP
    Mar 6, 2015
    10
    @timonwong
    @otakustay
    @iyaozhen
    我懂了,是我搞错了,concat不赋值给b,啊哈哈哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1026 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 19:09 · PVG 03:09 · LAX 11:09 · JFK 14:09
    ♥ Do have faith in what you're doing.