I need to create a string value depending on the length of the array.
var array = ["left", "right", "top", "bottom"];
//list contain array of Object
list.forEach((po) => {
//for example if the length of the list is 10. i need to generate the string for each loop like this
// "left0" for 1 loop i need this value
// "right0" for 2 loop i need this value
// "top0" for 3 loop i need this value
// "bottom0" for 4 loop i need this value
// "left1" for 5 loop i need this value
// "right1" for 6 loop i need this value
// "top1" for 7 loop i need this value
// "bottom1" for 8 loop i need this value
// "left2" for 1 loop i need this value
// "right2" for 2 loop i need this value
}
Please help me with this issue. i am finding difficult generating string along with the number at the last and the left, right, top, bottom should be in the order and number should change after 5 loop as shown
for(var i=0; i<list.length; i++){ ... = array[i] + ParseInt(i/array.length); }