JavaScript - creating elements using a loop

Hi guys! Is it possible to draw rectangles one under the other in JavaScript by looping through items on a database? Each an every rectangle will belong to a database item and will get it’s height from it’s item. How should I go about it?

New to coding so wording might have been confusing, but I’d be more than happy to clarify!

Hi @crazyh0rse welcome to the community and thanks for the question!

In order for the community to suggest ideas to help you solve your code issue it would be useful to share a link to your Repl.

Any error messages that you see appear when you attempt to run your code would also be useful to share here.

I noticed you said you were new to coding so I wonder if you have prior experience in working with databases. It seems quite a complex problem to solve at the start of your programming journey!


Thank you so much Ian for your kind response! I have no prior experience with databases so I was ignorantly hoping it would be similar to working with lists which doesn’t seem to be the case.

Do you mind pointing me to a resource where I can learn the basics of databases?

Heres the tutorial for the Replit data base.