edit
This commit is contained in:
parent
e78e527866
commit
05a93ced80
212 changed files with 3213 additions and 3968 deletions
|
@ -1,7 +1,6 @@
|
|||
The answer: `1`.
|
||||
|
||||
```js
|
||||
//+ run
|
||||
```js run
|
||||
let i = 3;
|
||||
|
||||
while (i) {
|
||||
|
@ -9,7 +8,7 @@ while (i) {
|
|||
}
|
||||
```
|
||||
|
||||
Every loop iteration decreases `i` by `1`. The check `while(i)` stops the loop when `i = 0`.
|
||||
Every loop iteration decreases `i` by `1`. The check `while(i)` stops the loop when `i = 0`.
|
||||
|
||||
Hence, the steps of the loop make the following sequence ("loop unrolled"):
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Last loop value
|
||||
importance: 3
|
||||
|
||||
[importance 3]
|
||||
---
|
||||
|
||||
# Last loop value
|
||||
|
||||
What is be the last value alerted by this code? Why?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue