javascript - toString() doesn't work like it used to do -


I have a problem I have an address, for example:

  var g = "1 9 2"; // global defined // function g () {if (g <200) {g.toString (); Console.log (typeof (g)); G ++; Window.setTimeout ("RGB ()", 3000); } And {return; }} $ (G);  

I will run this code, and first it will come back to "string". But on the second run, why does it give "number"? The function itself is the g.toString () method. Why is the number changing after one run?

Thank you for your reply!

You need to asign the string in its variable and such a different to your functions or variables The name is:

  var g = "1 9 2"; // global defined // function test () {if (g <195) {g = g.toString (); Console.log (typef (g)); G ++; } And {return; } } testing();  

View this


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

scala - Play Framework - how to bind form to a session field -

java - UtteranceProgressListener not working for Android TTS -