+
to build a new string, using the provided variables: myNoun
, myAdjective
, myVerb
, and myAdverb
. You will then assign the formed string to the wordBlanks
variable. You should not change the words assigned to the variables.
You will also need to account for spaces in your string, so that the final sentence has spaces between all the words. The result should be a complete sentence.
wordBlanks
should be a string.
testString: assert(typeof wordBlanks === 'string');
- text: You should not change the values assigned to myNoun
, myVerb
, myAdjective
or myAdverb
.
testString: assert(myNoun === "dog" && myVerb === "ran" && myAdjective === "big" && myAdverb === "quickly");
- text: You should not directly use the values "dog", "ran", "big", or "quickly" to create wordBlanks
.
testString: const newCode = removeAssignments(code); assert(!/dog/.test(newCode) && !/ran/.test(newCode) && !/big/.test(newCode) && !/quickly/.test(newCode));
- text: wordBlanks
should contain all of the words assigned to the variables myNoun
, myVerb
, myAdjective
and myAdverb
separated by non-word characters (and any additional words in your madlib).
testString: assert(/\bdog\b/.test(wordBlanks) && /\bbig\b/.test(wordBlanks) && /\bran\b/.test(wordBlanks) && /\bquickly\b/.test(wordBlanks));
```