You are reading a single comment by @arthurj and its replies. Click here to read the full conversation.
  • I think that this must be an inconsistency in Espruino

    a = "1"
    ="1"
    a++
    ="1"
    a++
    ="11"
    a++
    ="111"
    a = "s"
    ="s"
    a++
    ="s"
    a++
    ="s1"
    a++
    ="s11"
    a++
    ="s111"

    I would have expected (and comfirmed using javascript console in chrome) that if the string were a number it would return 1 , 2, 3 otherwise it would return NaN rather than concatenate 1 on the end.

    Is this a bug?

About

Avatar for arthurj @arthurj started