0👍
You can use Math.floor(i/3)+1
here i
index and start form 0
for(i=0;i<=10;i++){
console.log(Math.floor(i/3)+1);
}
Source:stackexchange.com
0👍
You can use Math.floor(i/3)+1
here i
index and start form 0
for(i=0;i<=10;i++){
console.log(Math.floor(i/3)+1);
}