Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var people = [
{
name: "J.D. Zamfirescu",
food: "宫保鸡丁",
color: "blue"
},
{
name: "Adam Smith",
food: "小笼包",
color: "red"
}
];
textAlign(CENTER);
for (var i = 0; i < people.length; i += 1) {
fill(0);
textSize(15);
text("❤️", width/2, height/2-10);
textSize(40);
text(people[i].name, width/2, height/2-30);
fill(people[i].color);
text(people[i].food, width/2, height/2+30);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment