Step - repeat

repeat ยท category: Branches and loops

Runs the child traversal in a loop, controlled by times(), until() and emit(); a name makes loops(name) readable.

Forms

repeat(arg1: any)
repeat(arg1: string, arg2: any)

Example

g.v(1).repeat(__.out()).times(2).values("name").to_list()   // ["ripple", "lop"]

See also