mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-05 00:00:18 -04:00
fix(curriculum): fixing syntax error in question code (#56363)
This commit is contained in:
@@ -83,19 +83,21 @@ console.log( counter++ ); // 0
|
||||
|
||||
## --text--
|
||||
|
||||
What is the difference in the result of the two console log statements in the JavaScript code below?
|
||||
What are the outputs of the two `console.log` statements in the JavaScript code below?
|
||||
|
||||
```js
|
||||
let counter = 1;
|
||||
console.log(2 * ++counter); // Statement A
|
||||
```
|
||||
|
||||
```js
|
||||
let counter = 1;
|
||||
console.log(2 * counter++); // Statement B
|
||||
```
|
||||
|
||||
## --answers--
|
||||
|
||||
There is no difference; both alert statements will show the same result.
|
||||
There is no difference; both `console.log` statements will show the same result.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user