Open PeppeL-G opened 5 years ago
Client-Server Communication
I'm trying to compute and display the sum of 8 and 9 in JavaScript.
My JavaScript code looks like this:
const sum = 5 + 9 alert(sum)
When I run the code in a web browser it displays the number 14 instead of the expected number 17.
Why does it display the number 14 instead of the expected number 17?
With your current code you compute the sum of 5 and 9, not the sum of 8 and 9.
Close this issue if you think your problem is solved.
Course
Client-Server Communication
The problem
I'm trying to compute and display the sum of 8 and 9 in JavaScript.
Failed attempt
My JavaScript code looks like this:
When I run the code in a web browser it displays the number 14 instead of the expected number 17.
The question(s)
Why does it display the number 14 instead of the expected number 17?