I have a number in my application value is 6,
by using this value i have to create an array of [1, 2, 3, 4, 5, 6] using javascript/typescript
i have tried this in my application
this.builder.group({
'staff': this.builder.group({
staff: [false],
id: [this.staffData[i].users[j].id],
labelName: [this.staffData[i].users[j].name],
controlname: ['staff'],
cssclass: ['error'],
checked: [false],
customcss: ['test1'],
dayid: this.selectedDay,
number: Array(this.appointmentsData.numberofSlots).fill().map((x,i) => i)})
})
but i am getting number as 0 in browser console. in VSCode also it is showing excepted 1-3 arguments but got 0 (i think it is for fill() method as i am passing 0 values , but i am unable to understand what to pass for fill() arguments) please help me