fix(curriculum): fixing syntax error in question code (#56363)

This commit is contained in:
Om Dhede
2024-09-30 22:22:03 +05:30
committed by GitHub
parent 6e5a9bc5a5
commit f96807641b

View File

@@ -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.
---