mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): remove before/after-user-code from basic javascript challenges 13-16 (#66455)
This commit is contained in:
@@ -47,18 +47,6 @@ assert(__helpers.removeJSComments(code).match(/myStr\s*\+=\s*(["']).*\1/g));
|
||||
|
||||
# --seed--
|
||||
|
||||
## --after-user-code--
|
||||
|
||||
```js
|
||||
(function(){
|
||||
if(typeof myStr === 'string') {
|
||||
return 'myStr = "' + myStr + '"';
|
||||
} else {
|
||||
return 'myStr is not a string';
|
||||
}
|
||||
})();
|
||||
```
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
|
||||
@@ -39,25 +39,6 @@ assert(__helpers.removeJSComments(code).match(/["']\s*\+\s*myName\s*\+\s*["']/g)
|
||||
|
||||
# --seed--
|
||||
|
||||
## --after-user-code--
|
||||
|
||||
```js
|
||||
(function(){
|
||||
var output = [];
|
||||
if(typeof myName === 'string') {
|
||||
output.push('myName = "' + myName + '"');
|
||||
} else {
|
||||
output.push('myName is not a string');
|
||||
}
|
||||
if(typeof myStr === 'string') {
|
||||
output.push('myStr = "' + myStr + '"');
|
||||
} else {
|
||||
output.push('myStr is not a string');
|
||||
}
|
||||
return output.join('\n');
|
||||
})();
|
||||
```
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
|
||||
@@ -44,12 +44,6 @@ assert(/myStr = "Jello World"/.test(__helpers.removeJSComments(code)));
|
||||
|
||||
# --seed--
|
||||
|
||||
## --after-user-code--
|
||||
|
||||
```js
|
||||
(function(v){return "myStr = " + v;})(myStr);
|
||||
```
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
|
||||
@@ -30,6 +30,16 @@ You will need to use the string concatenation operator `+` to build a new string
|
||||
|
||||
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.
|
||||
|
||||
# --before-each--
|
||||
|
||||
```js
|
||||
const removeAssignments = str => str
|
||||
.replace(/myNoun\s*=\s*["']dog["']/g, '')
|
||||
.replace(/myAdjective\s*=\s*["']big["']/g, '')
|
||||
.replace(/myVerb\s*=\s*["']ran["']/g, '')
|
||||
.replace(/myAdverb\s*=\s*["']quickly["']/g, '');
|
||||
```
|
||||
|
||||
# --hints--
|
||||
|
||||
`wordBlanks` should be a string.
|
||||
@@ -74,16 +84,6 @@ assert(
|
||||
|
||||
# --seed--
|
||||
|
||||
## --after-user-code--
|
||||
|
||||
```js
|
||||
const removeAssignments = str => str
|
||||
.replace(/myNoun\s*=\s*["']dog["']/g, '')
|
||||
.replace(/myAdjective\s*=\s*["']big["']/g, '')
|
||||
.replace(/myVerb\s*=\s*["']ran["']/g, '')
|
||||
.replace(/myAdverb\s*=\s*["']quickly["']/g, '');
|
||||
```
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user