> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/syntax_and_semantics/constructs/do_while.md).

# Do/While

A `do/while` construct guarantees the execution of the block at least once.

```ruby
var name = ''

do {
    name = read("username: ", String)
} while(name ~~ /^(root|)\z/)

say "Your username is #{name}"
```
