Skip to content

Commit

Permalink
Update the formatting of Question 7 (Ebazhanov#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushagg31 authored Sep 18, 2020
1 parent 52812df commit e97ca8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions javascript/javascript-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ console.log('Results shown');
- immediately <<<<<----Correct
#### Q7. You've written the code shown to log a set of consecutive values, but it instead results in the value 5, 5, 5, and 5 being logged to the console. Which revised version of the code would result in the value 1, 2, 3 and 4 being logged?
- ```for (var i=1; i<=4; i++){
```js
for (var i=1; i<=4; i++){
setTimeout(function(){
console.log(i);
}, i*10000);
}`
}
```
- `for (var i=1; i<=4; i++){
(function(i){
setTimeout(function(){
Expand Down

0 comments on commit e97ca8b

Please sign in to comment.