Why do I need to do this when looping over an array?


Why do i need to save the items of an array into another array when using loops? plus theres no way to use the current loop item in the code.
Example
**arr= [1,1,1];

for(let i = 0;i < arr.length(); i++){
numb = 0;
numb += arr[i];
}**

all this does is make loops a pain to use.

Not sure why you’re doing what you are currently. Unless you have some specific need for a local variable, you should just be able to loop over your data array.

The “Store the child in variable (blah)” is what gives you the value into a temporary scene variable. And then you use that temporary scene variable in the event in any condition or action.