inktherapy Posted October 8, 2008 Share Posted October 8, 2008 Hi Guys,I was browsing the web but I couldn't find any detailed explanation on how to change the value on variables while in the process of execution?e.g. var x = 100; I want the value change like x = 50;This will help a lot if someone can teach and show me how... thanks Link to comment Share on other sites More sharing options...
aspnetguy Posted October 8, 2008 Share Posted October 8, 2008 You are going to have to explain what you mean. I don't know what you are asking. If you want to change the value of a variable you just change it like this. var x = 100;//do other stuffx = 50; Link to comment Share on other sites More sharing options...
inktherapy Posted October 8, 2008 Author Share Posted October 8, 2008 You are going to have to explain what you mean. I don't know what you are asking. If you want to change the value of a variable you just change it like this.var x = 100;//do other stuffx = 50; Hi aspnetguy,That was easy hehehe jk, what I was trying to say is, if I run a set of codes during that process, is it possible to change a variable like from var x = 100; to shall i say, put it in "if stament" to change the x variable to = 50;? Is that possible?Thanks. Link to comment Share on other sites More sharing options...
aspnetguy Posted October 8, 2008 Share Posted October 8, 2008 like var x = 100;if(the_sky_is_blue) { x = 50;} yes you can Link to comment Share on other sites More sharing options...
inktherapy Posted October 9, 2008 Author Share Posted October 9, 2008 likevar x = 100;if(the_sky_is_blue) { x = 50;} yes you can Hi Sir,I partially found an answer to my question http://www.w3schools.com/js/js_variables.asp, now im going to test it or look for a code that will explain further more about this process. Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.