Can you specify a range of values instead of typing each value one by one?
I don't want this:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
I want this (or something similar):
[1 to 20]
Thank you!
Can you specify a range of values instead of typing each value one by one?
I don't want this:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
I want this (or something similar):
[1 to 20]
Thank you!
Yes, with some javascript : arrays - Does JavaScript have a method like "range()" to generate a range within the supplied bounds? - Stack Overflow
Just a thought here. Don't JS blocks return an empty string if you don't have a return statement?
Have you tried #{}?
@GeneralMidi is right. Also, "_" is not defined, it's a 3rd party library called "lodash", there are other examples that don't require any library.
The working example I found is this:
Array.from(new Array(*number of values*), (x, i) => i + *lowerBound*);
As @GeneralMidi said, #{}
is needed here.
Thank you!