I need to generate an array based on the given minimum and maximum number. It should be equally divided into 7 parts. I am trying this in my typescript code
Here is the code that I have written. Could you let me know what is going wrong
private generate1YAxisArray(min: any, max: any) {
let count = 7;
for (let i = min; i <= max; i = count) {
this.yAxisData.push(count);
}
}
答案 0 :(得分:0)
Try this:
private generate1YAxisArray(min: any, max: any) {
let count = 7;
for (let i = min; i <= max; i++) {
this.yAxisData.push(count);
}
}
Whats the purpose of count?