[Vuejs]-How to Dynamically change variables in Vue Js with a For Loop?

0👍

you should put your food names in an array and access it with foodName[i]

0👍

You can access object property names dynamically using brackets:

this["foodName"+i] = "";

Leave a comment