Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Why this function doesn’t work in ‘for loop’ ? [jquery] Re: Why this function doesn’t work in ‘for loop’ ? [jquery]

#127669
sayedtaqui
Member

just one last thing.
I was experimenting and wrote this seprately

k= 3;
num= k+1;
y= ‘row’+(num+1);
alert(y);
//returns row5

So why in our case we are required to use (+num+1) or else it returns 11 as a string but doesn’t add the value ?