Update Examples

Glen Whitney 2024-08-25 04:02:39 +00:00
parent 5a2bb177a3
commit f42cb5718c

@ -833,11 +833,36 @@ fn main
<td> <td>
``` ```
fn main() {
let mut counter = 0;
let result = loop {
counter += 1;
if counter == 10 {
break counter * 2;
}
};
assert_eq!(result, 20);
}
``` ```
</td><td> </td><td>
``` ```
fn main
let mut counter = 0
let result = loop
counter += 1
if counter == 10 then break counter * 2
assert_eq! result, 20)
``` ```
</td></tr></table> </td></tr></table>