I'm new to JS and developing in general and I'm kind of stuck here.
I want to use a google Sheet as a backend and query it with js/jquery. I queried the sheet correctly and parsed every row of it (achieved with a forEach). The results from column D and B are combined to a string in the end. I got this working, but, of course, I have 5 outputs or so.
So at the moment, every row (5 rows in the sheet) is a single output, concatenated to a string, so the final output is: output(d[i])+string+output(b[j]) , where i and j are the variables from the for loops.
The result in the console is:
(index):103 AccessRequestPending
(index):103 AccesssDenied
(index):103 NotConfirmed
(index):103 toOldVersion
(index):103 UnknownReason
These are the results, when I run the script (only for column D). I can't push the results to an array, because it pushes the result 5 times to the same array. So in the end, there's just one array with [UnknownReason], But I need 1 array(or just the strings, it doesn't matter) with the 5 results concatenated.
I'd like to achieve something like
output(d[i1])+string+output(b[j1]) + output(d[i2])+string+output(b[j2]) + output(d[i3])+string+output(b[j3])
So, I really want to figure it out by myself, but can you tell me how to use every output/result of an iteration and concat it with the iteration before? Or maybe extract each result to it's own variable?
Thanks in advance!