javascript - HTML Json parsing strings -
I am using html and JSON. What I'm doing is leveling a game in JSON and parsing information in JavaScript.
I have no problem in doing this when the information is an integer, for example I will just correct the following:
For (var i = 0; i & Lt; curNode.options.length; i ++) {var x = parseInt (curNode.options [i] .x); Var y = parseInt (curNode.options [i] .y); // set choice = new option (view); Choice.setPosition (X, Y); }
even further. I can do it with width, height etc., but I'm not sure how to do it when working with the string.
You can easily type in:
Var avariable = 3; Var astring = avariable + ''; Var anotherstring = new string (avariable);
Comments
Post a Comment