+ 2
Can you use java script for loop to create many elemnts
6 Respostas
+ 2
elements like canvas
+ 2
I mean create many canvas in the same time by using for loop
+ 1
You didn't specify what kind of elements so I shall assume array elements:
let arr = [];
for (let i = 0; i < 10; i++)
arr.push(i);
+ 1
just specify the element's id by using getElementById for dom manipulation and do as you like on that
+ 1
thank you 😊
0
Commented example I made:
https://code.sololearn.com/WARzRSFQ17oq/?ref=app