var library = [ //array of 3 objects
{ title:”I Know Why The Caged Bird Sings”,
author:”R. Michener”,
stars:4 },
{ title:”Alaric the Goth”,
author:"Boin",
stars:4 },
{ title:”Caesar Invades Gaul”,
author:”Goldsworthy”,
stars:4 }
];
fill(140, 107, 7); // brown bookshelf
rect(0,120,width,20);
for(var i = 0; i < 3; i++) {
fill(100 + 100*i, 200, 100 + 100*i); // 3 book covers different colors
rect(20 + 110*i,20,90,100);
textSize(15);
fill(93, 105, 25);
text(library.title[i],20 + 110*i,60,90,40,80,30);
}
I thought this code would place the titles of the books on to the book covers in the top 1/3 of the cover but no - nothing happens - I think the code looks OK so I don’t see where I am going wrong