Hi guys.My name is Trong Anh and I’m not sure what’s going on to my javascript code.
This one:https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript
When I make a variable difference like this and it has an error
difference = 12;
var difference = 45-12;
It doesn’t get the difference equal 12.
45 - 12 is 33, not 12
Hello @tronganh you have to replace the value 0
with any number so the difference is 12
.
you’re replacing 0
with 12
and answer is 33
but answer should be 12
.
var difference = 45 - 0;
var difference = 45 - 17; // edited code, but not working…!
// running tests
The variable difference should be equal to 12.
You should only subtract one number from 45.
// tests completed
I don’t understand this question in this lesson.
45 - 17 isn’t 12, that would be why your test is failing