Tell us what’s happening:
Your code so far
myVar 20 = 10 + 10;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript
1 Like
With variables, you assign the value on the right hand side of the =
to the name on the left. So
someName = some value
So with this, the name is myVar
and the value is the result of 10 + 10
. You don’t need to specify what 10 + 10 actually is, JS does that for you, you should just be saying myVar
is 10 + 10
1 Like
Change the 0
so that sum will equal 20
.
That is our task
The name is var sum like we do in math also X Y = 10+10
then all is left is the sum itself now we change the 0 to a 10 since 10+ 10=20
so it becomes
var sum = 10 + 10;