Forum : arrays
Brief description  about Online courses   join in Online courses
View sree sindhu sruthi 's Profile

arrays

Dear sir,
can you please explain what is the given statement
TA.value = TA.value "lottery[" i "] = " lottery[i] " ".I have understood that it gives text but there are many plus( )and double quotes(")and one equals to (=)sign is there .I am unable to analyse how it adds ,how it takes the number from the array.so please give sufficent explanation for the symbols.
Thank you.
Regards,
sree sindhu sruthi.
Asked by sree sindhu sruthi | Jan 21, 2011 |  Reply now
Replies (2)
View sree sindhu sruthi 's Profile
Dear sir,
I understood about symbol plus(+) but what are quotations (") for.
Regards,
Sree sindhu sruthi.
Feb 1, 2011
View teacher siliconindia 's Profile
Hi Sree Sindhu,

TA.value = TA.value + "lottery[" + i + "] = " + lottery[i] + " "

'+' ll just append the next value, it may be a variable or string. like in above case, consider,

ta.value = 'hi'
lottery[0] = '1'
lottery[1] = '2'

if loop 'i' value is '0', then that statement ll be,

ta.value = 'hi + lottery[0] = 1' , then ta.value string has string 'hi lottery[0]=1'

if loop 'i' value is '1', then that statement ll be,

ta.value = 'hi + lottery[1] = 2' , then ta.value string has string 'hi lottery[1]=2'

Jan 31, 2011