Expand my Community achievements bar.

Join us for the Adobe Journey Optimizer Community Q&A Coffee Break on 4th September at 8 am PT with Journey Optimizer experts Aaron Forest, Justin Grover, Keara Fausett and Sandra Hausmann.
SOLVED

Basic for loop

Avatar

Level 2

I am new to AJO and would like to code a basic for loop, something like this in JavaScript,

 

for (let i = 0; i < cars.length; i++) {
  text += cars[i] + "Car";
} 

 

Any suggestions?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@GeorgeVi2 You don't have for loop. Instead, see if you can use each function to see if that helps. Take a look at this documentation,

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalizatio...

Thanks, Sathees

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@GeorgeVi2 You don't have for loop. Instead, see if you can use each function to see if that helps. Take a look at this documentation,

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalizatio...

Thanks, Sathees