linux1880 Posted September 7, 2010 Share Posted September 7, 2010 hi friends, what does this variable means in javascript ? pls help var params = 'id='+id; Link to comment https://forums.phpfreaks.com/topic/212756-what-does-this-mean-in-javascript/ Share on other sites More sharing options...
Adam Posted September 7, 2010 Share Posted September 7, 2010 That just concatenates (joins the variable and string together to make one string) and stores in the params variable. Link to comment https://forums.phpfreaks.com/topic/212756-what-does-this-mean-in-javascript/#findComment-1108251 Share on other sites More sharing options...
Psycho Posted September 7, 2010 Share Posted September 7, 2010 Um, which variable are you referring to? There are two variables in the code you posted: 'params' and 'id'. But, to elaborate on MrAdam's post, that line instanciates a new variable ('params') and set's it to a string value consisting of the string 'id=' and the value of the variable 'id'. SO, if the variable 'id' was set to the value '23', then the variable 'params' would contain the string 'id=23' Link to comment https://forums.phpfreaks.com/topic/212756-what-does-this-mean-in-javascript/#findComment-1108389 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.