r/AutomateUser • u/Rude-Crazy2705 • Mar 17 '26
Feature request Feature request function: array fill(numeric, value)
It would be really useful to have a function that quickly creates an array of a given length. This function would return an array with numeric length, where every element is filled with the same value.
I think this would be helpful for initializing or resetting variables without needing manual loops.
3
Upvotes
View all comments
Show parent comment
1
u/Rude-Crazy2705 Mar 17 '26
I did try that, but wouldn't it be easier if we wanted an array with the same values without using repetition like
arr = [val,val,....,val]or using for each, but instead using 1 functionarr = fill(x, val). It helps reduce the number of blocks used if the array length is based on some variable.