I've a lot of trouble with this sample of code here... I'm sure it is a beginner question but I've no idea what is wrong...
I want to do some calculations with the values in the array I got from a range but I cannot get the elements of the array, only the complete array...
var myarray = sh.getRange("A3:L3").getValues();
for (var i = 0; i < my myarray.length; i++){
var test = myarray[0];
myarray[i] = myarray[i] + 10;
}
First, is it possible to do the second line in the for loop (myarray[i] = myarray[i] + 10) ? I want to replace the value by this value plus 10.
I tried and it does not work for me and returns me NaN.
So I made the var "test" which returns me the full array and not just the first value of the array...
I am stuck and I've no idea what is wrong here...
Thank you for your help!
testis referring the complete array, then try usingforloop to iterate through it.