Strange behaviour for Object definition

Posted on
  • var x = {1:3,4:5,6:false}
    console.log(x)
    

    writes {1: 3,4: 5,6: false } in browser, tested in firefox and chrome

    Espruino writes {1: 3,4: 5,true: false }

  • Thanks - just fixed.

    Turns out it was an issue showing in JSON.stringify because when you have an int: bool combination then Espruino packs both into one variable

  • wow, that's response speed of the finest

  • No problem - I don't like issues that seem to be to do with JS execution to hang around :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Strange behaviour for Object definition

Posted by Avatar for JumJum @JumJum

Actions