Reusing variables the Copy action problems

  • Ran into a weird one in HTML5. Not sure if it is a bug or something I don't understand.

    Apparently, if you set a variable to an array index it becomes strongly typed as a number? If you then try to set it to a string it results in NaN. But set it to another number and no problem.

    But if you set the variable to a number it remains loosely typed and can then be set to a string no problem. Is this how it should work?


    NOTE: This is not how it works in Flash. instead of NaN in the above example it traces to TEST : string.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!