You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x= [1, 2,3,4,5,6]
sum=0f.forEach(v=>sum=sum+v)
print(sum) # incorrect sum will be here# workaround is to add it to the object. e.g.sum= {value: 0}
f.forEach(v=>sum.value=sum.value+v)
print(sum.value) # correct sum will be here