In computer science, a for-loop (or “for loop”) is used to run specified lines of code repeatedly. In different languages, there are different keywords to specify this statement—ways to identify a for loop—but they all do the same task. Most languages use either “for” or “do” as keywords.