# Unit 6 Lesson 22--Repeat

**URL:** <https://forum.code.org/t/unit-6-lesson-22-repeat/25417>\
**Category:** CS Principles\
**Created:** [March 8, 2019, 7:16pm UTC](https://forum.code.org/t/unit-6-lesson-22-repeat/25417 "2019-03-08T19:16:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![csurette](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@csurette](https://forum.code.org/u/csurette)\
**Post date:** [March 8, 2019, 7:16pm UTC](https://forum.code.org/t/unit-6-lesson-22-repeat/25417/1 "2019-03-08T19:16:54Z")

</div>

Student has code written and would like for it to repeat once it has fully completed. How can this be coded?

---

<div class="post-metadata">

**Author:** ![gjschmidt](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/gjschmidt/32/4922_2.png) [@gjschmidt](https://forum.code.org/u/gjschmidt)\
**Post date:** [March 18, 2019, 11:09pm UTC](https://forum.code.org/t/unit-6-lesson-22-repeat/25417/2 "2019-03-18T23:09:29Z")

</div>

Wrapping all the code in a while(true){} loop will cause that code to repeat forever.
