I write code:
for (var i = 0; i & lt; btnadd.length; i ++) {
Let Plusall = Btnadd [i];
}
Console.log (plusall); //does not work
How to make that I could use the Plusall variable in other functions or anywhere else.
Answer 1
Release Let Plusall
Out of Cycle:
let plusall;
For (var i = 0; i & lt; btnadd.length; i ++) {
Plusall = Btnadd [i];
}
Console.log (plusall);