fix(guide): Remove repl.it links from challenge related guide articles (English) (#36204)

* fix: remove repl.it links english

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>

* fix: add extra line

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
Randell Dawson
2019-07-01 06:49:24 -07:00
committed by Tom
parent 8afefa59e7
commit 331cbb88f8
72 changed files with 34 additions and 141 deletions

View File

@@ -46,7 +46,6 @@ This program is very simple, the trick is to understand what a boolean primitive
// test here
booWho(null);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnK/0' target='_blank' rel='nofollow'>Run Code</a>
# Code Explanation:

View File

@@ -67,7 +67,6 @@ Finally, we need a method to do the actual splitting and we can use `Array.slice
return result;
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/24' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -94,7 +93,6 @@ Finally, we need a method to do the actual splitting and we can use `Array.slice
return arr2;
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/Cj9x/3' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -125,7 +123,6 @@ Finally, we need a method to do the actual splitting and we can use `Array.slice
}
chunkArrayInGroups(["a", "b", "c", "d"], 2);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/26' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -154,7 +151,6 @@ Finally, we need a method to do the actual splitting and we can use `Array.slice
return newArr;
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/579' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -181,7 +177,6 @@ Finally, we need a method to do the actual splitting and we can use `Array.slice
}
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/WideBriskMining' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@@ -20,8 +20,6 @@ function confirmEnding(str, target) {
confirmEnding("He has to give me a new name", "name");
```
#### 🚀 [Run Code](https://repl.it/repls/SardonicRoundAfkgaming)
# Code Explanation:
- First we use the `slice` method copy the string.
- In order to get the last characters in `str` equivalent to the `target`'s length we use the `slice` method.

View File

@@ -143,6 +143,7 @@ function factorialize(num, factorial = 1) {
factorialize(5);
```
#### Code Explanation:
In this solution, we use <a href='https://stackoverflow.com/questions/33923/what-is-tail-recursion' target='_blank' rel='nofollow'>Tail Recursion</a> to optimize the the memory use.

View File

@@ -49,7 +49,6 @@ function bouncer(arr) {
return newArray;
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/WarmPlainWebportal' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
We create a new empty array.
@@ -71,7 +70,6 @@ We return the new array (newArray).
return arr.filter(Boolean);
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/32' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@@ -50,7 +50,6 @@ Remember how to get the length of elements on the array? `Array[index].length`.
return maxLength;
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/5' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -73,7 +72,6 @@ Then check for the longest word by comparing the current word to the previous on
}, 0);
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/6' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -144,7 +142,6 @@ For more information on `map` <a href='https://developer.mozilla.org/en/docs/Web
}
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/7' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@@ -49,7 +49,6 @@ title: Mutations
return true;
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/30' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -76,7 +75,6 @@ If they are _all_ found, the loop will finish without returning anything and we
});
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/31' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@@ -48,7 +48,6 @@ Make the variable created store the current value and append the word to it.
return accumulatedStr;
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/19' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -74,7 +73,6 @@ Make the variable created store the current value and append the word to it.
}
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/21' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -87,6 +85,24 @@ Make the variable created store the current value and append the word to it.
* <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#Recursion' target='_blank' rel='nofollow'>Functions - Recursion</a>
## ![:rotating_light:](https://forum.freecodecamp.com/images/emoji/emoji_one/rotating_light.png?v=3 ":rotating_light:") Advanced Code Solution:
function repeatStringNumTimes(str, num) {
return num > 0 ? str.repeat(num) : '';
}
repeatStringNumTimes("abc", 3);
### Code Explanation:
* This solution takes a declarative approach.
* It is similar to the third solution, except it uses the ternary operator form of the `if` statement.
#### Relevant Links
* <a href='https://forum.freecodecamp.com/t/javascript-ternary-operator/15973' target='_blank' rel='nofollow'>JS Ternary</a>
## ![:clipboard:](https://forum.freecodecamp.com/images/emoji/emoji_one/clipboard.png?v=3 ":clipboard:") NOTES FOR CONTRIBUTIONS:
* ![:warning:](https://forum.freecodecamp.com/images/emoji/emoji_one/warning.png?v=3 ":warning:") **DO NOT** add solutions that are similar to any existing solutions. If you think it is **_similar but better_**, then try to merge (or replace) the existing similar solution.

View File

@@ -52,7 +52,6 @@ Pay close attention to the timing of the storing of variables when working with
return results;
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/734' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -80,7 +79,6 @@ Pay close attention to the timing of the storing of variables when working with
});
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/733' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -103,7 +101,6 @@ Pay close attention to the timing of the storing of variables when working with
return arr.map(Function.apply.bind(Math.max, null));
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/17' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@@ -50,7 +50,6 @@ function frankenSplice(arr1, arr2, n) {
return localArray;
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/RedundantGrossGenres' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -74,7 +73,6 @@ function frankenSplice(arr1, arr2, n) {
return localArr;
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/BelovedNegativeMoto' target='_blank' rel='nofollow'>Run Code</a>
* Since our goal is to return the new array with out altering `arr1` or `arr2` we create a `localArr` and add all the items from `arr2` using the `slice()` function

View File

@@ -56,7 +56,6 @@ We have to return a sentence with title case. This means that the first letter w
return updatedTitle.join(' ');
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/8' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -83,7 +82,6 @@ Split the string by white spaces, and create a variable to track the updated tit
titleCase("I'm a little tea pot");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/9' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -99,7 +97,6 @@ We are making entire string lowercase and then converting it into array. Then we
return str.toLowerCase().replace(/(^|\s)\S/g, (L) => L.toUpperCase());
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/14' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@@ -40,7 +40,6 @@ You will need to use the slice() method and specify where to start and where to
}
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/55' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@@ -54,7 +53,6 @@ You will need to use the slice() method and specify where to start and where to
return (str.length > num)?(str.slice(0,num)+"..."):str;
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/54' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@@ -50,7 +50,6 @@ If there is no index for that number then you will have to deal with that case t
return arr.length;
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/36' target='_blank' rel='nofollow'>Run Code</a>
## Code Explanation:
@@ -74,7 +73,6 @@ If there is no index for that number then you will have to deal with that case t
getIndexToIns([40, 60], 50);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/2547' target='_blank' rel='nofollow'>Run Code</a>
## Code Explanation:
@@ -102,7 +100,6 @@ by [@HarinaPana](/u/harinapana)
getIndexToIns([40, 60], 50);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/4135' target='_blank' rel='nofollow'>Run Code</a>
## Code Explanation:
@@ -120,7 +117,6 @@ by [@faustodc](/u/faustodc)
return arr.indexOf(num);
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/EB10/1' target='_blank' rel='nofollow'>Run Code</a>
## Code Explanation:
@@ -148,7 +144,6 @@ by [@faustodc](/u/faustodc)
getIndexToIns([40, 60], 500);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/63' target='_blank' rel='nofollow'>Run Code</a>
## Code Explanation:
@@ -174,7 +169,6 @@ by [@nivrith](/u/nivrith)
getIndexToIns([1,3,4],2);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/IUJE/0' target='_blank' rel='nofollow'>Run Code</a>
## Code Explanation: