Run »
fruits <- list("apple", "banana", "cherry") for (x in fruits) { if (x == "cherry") { break } print(x) }
[1] "apple"
[1] "banana"