How do I create an array, which increments up to a certain number?
For example, I have a variable, with the value of 3:
const totalNumber = 3;
Is it possible, to convert this to an array, but the array increments from every number, up to and including 3?
For example, I would want the out put to be:
[1,2,3]
So if the value was 10, output would be:
[1,2,3,4,5,6,7,8,9,10]