Reputation: 13
for(i = 1; i <= 20; i++){
let ingredient = meal.strIngredient + i
}
How can I put the value of variable i, in front of meal.strIngredient to pass in all strIngredient??
I need : meal.strIngredient1, meal.strIngredient2, meal.strIngredient3, meal.strIngredient4 ...
Upvotes: 1
Views: 35