-1
Boas, I want to insert an image according to the amount of times existing in the property of an object. It is easier to explain with an example:
I have this object:
var book = [
{
title: "O Tatuador de Auschwitz",
stars: 4,
Author: "Heather Morris",
Validation: true
}
]
and in this case I want to insert an image 4 times (according to the Stars property). To do this I created a cycle for
as follows:
for (var s = 0; s < book.stars ; s++) {
image(starj,s,100,20,20);
}
starj
this defined with the image I want to insert
what I’m doing wrong?
Thank you
P.S. I’m still very green in this..
You can give us the full code example you are using?
– Luiz Felipe
Welcome Tiagooliveira86, read this post for better answers https://answall.com/help/mcve
– user60252