Number
is a data type in JavaScript which represents numeric data.
Now let's try to add two numbers using JavaScript.
JavaScript uses the +
symbol as an addition operator when placed between two numbers.
Example:
myVar = 5 + 10; // assigned 15
0
so that sum will equal 20
.
sum
should equal 20
testString: assert(sum === 20, 'sum
should equal 20
');
- text: Use the +
operator
testString: assert(/\+/.test(code), 'Use the +
operator');
```