Randell Dawson 2c15bcbb43 fix(curriculum): changed test text to use should for JavaScript Algorithms and Data Structures (#37761)
* fix: corrected typo

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
2019-11-27 11:57:38 +01:00

1.2 KiB

id, title, challengeType, videoUrl, forumTopicId
id title challengeType videoUrl forumTopicId
cf1111c1c11feddfaeb3bdef Add Two Numbers with JavaScript 1 https://scrimba.com/c/cM2KBAG 16650

Description

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

Instructions

Change the 0 so that sum will equal 20.

Tests

tests:
  - text: <code>sum</code> should equal <code>20</code>.
    testString: assert(sum === 20);
  - text: You should use the <code>+</code> operator.
    testString: assert(/\+/.test(code));

Challenge Seed

var sum = 10 + 0;

After Test

(function(z){return 'sum = '+z;})(sum);

Solution

var sum = 10 + 10;