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

@ -85,7 +85,6 @@ In the event of *odd number of sets* the symmetric difference will include ident
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href="https://repl.it/C4II/0" target="_blank" rel="nofollow">Run Code</a>
### Code Explanation: ###
@ -140,7 +139,6 @@ In the event of *odd number of sets* the symmetric difference will include ident
sym([1, 2, 3], [5, 2, 1, 4]);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href="https://repl.it/CLoc/0" target="_blank" rel="nofollow">Run Code</a>
### Code Explanation: ###
@ -175,7 +173,6 @@ In the event of *odd number of sets* the symmetric difference will include ident
sym([1, 2, 3], [5, 2, 1, 4]);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href="https://repl.it/@ashenm/Symmetric-Difference" target="_blank" rel="nofollow">Run Code</a>
### Code Explanation: ###

View File

@ -41,8 +41,7 @@ function bubbleSort(array) {
return array;
}
```
- [Run Code](https://repl.it/@ezioda004/Bubble-Sort)
### References:
- [GeeksForGeeks](https://www.geeksforgeeks.org/bubble-sort/)
- [Wikipedia](https://en.wikipedia.org/wiki/Bubble_sort)

View File

@ -26,7 +26,6 @@ function insertionSort(array) {
return array;
}
```
- [Run Code](https://repl.it/@ezioda004/Insertion-Sort)
### References:

View File

@ -44,7 +44,7 @@ function mergeSort(array) {
return merger(left, right);
}
```
- [Run Code](https://repl.it/@ezioda004/Merge-Sort)
### References:
- [Wikipedia](https://en.wikipedia.org/wiki/Merge_sort)
- Video by [Hackerrank](https://www.youtube.com/watch?v=KF2j-9iSf4Q)

View File

@ -44,7 +44,7 @@ function quickSort(array, left = 0, right = array.length-1) {
return array;
}
```
- [Run Code](https://repl.it/@ezioda004/Quick-Sort)
### Reference:
- [Wikipedia](https://en.wikipedia.org/wiki/Quicksort)
- [Khan Academy](https://www.khanacademy.org/computing/computer-science/algorithms/quick-sort/a/overview-of-quicksort)

View File

@ -105,7 +105,6 @@ Return the completed inventory in alphabetical order.
updateInventory(curInv, newInv);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLok/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -191,7 +190,6 @@ Return the completed inventory in alphabetical order.
updateInventory(curInv, newInv);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLol/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -267,7 +265,6 @@ Return the completed inventory in alphabetical order.
updateInventory(curInv, newInv);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/MQvv/latest' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -141,7 +141,6 @@ A way to visualize this is by considering a tree that starts with the first char
// Test here.
permAlone('aab');
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLop/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -120,6 +120,6 @@ class PriorityQueue {
}
}
```
- [Run Code](https://repl.it/@ezioda004/Priority-Queue)
### References:
- [Wikipedia](https://en.wikipedia.org/wiki/Priority_queue)

View File

@ -46,8 +46,6 @@ function checkSet() {
checkSet();
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/HighlevelImperfectDiscussion' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
* Creating a set object as shown in pre-written code will create the set without duplicate objects.

View File

@ -20,7 +20,6 @@ function multiplesOf3and5(number) {
return sum;
}
```
- [Run Code](https://repl.it/@ezioda004/Project-Euler-Problem-1-Multiples-of-3-and-5)
### Reference:

View File

@ -49,7 +49,6 @@ function primeSummation(n) {
}
```
- [Run Code](https://repl.it/@ezioda004/Project-Euler-Problem-10-Summation-of-primes)
### References:
- Sieve of Eratosthenes [Wikipedia](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes)

View File

@ -48,6 +48,6 @@ function fiboEvenSum(n){
return sumEven;
}
```
- [Run Code](https://repl.it/@scissorsneedfoo/Project-Euler-Problem-2-Even-Fibonacci-Numbers)
### References:
- [Wikipedia](https://en.wikipedia.org/wiki/Fibonacci_number)

View File

@ -23,7 +23,7 @@ function largestPrimeFactor(number) {
return max;
}
```
- [Run Code](https://repl.it/@ezioda004/Problem-3-Largest-prime-factor)
### Resources:
- [Wikipedia](https://en.wikipedia.org/wiki/Prime_number)

View File

@ -45,7 +45,7 @@ function largestPalindromeProduct(n) {
return Math.max(...res);
}
```
- [Run Code](https://repl.it/@ezioda004/Problem-4-Largest-palindrome-product)
### References:
- [Wikipedia](https://en.wikipedia.org/wiki/Palindromic_number)

View File

@ -33,7 +33,7 @@ function smallestMult(n){
return maxLCM;
}
```
- [Run Code](https://repl.it/@ezioda004/Problem-5-Smallest-multiple)
### References:
- [Euclidean algorithm](https://en.wikipedia.org/wiki/Euclidean_algorithm)
- [LCM](https://en.wikipedia.org/wiki/Least_common_multiple)

View File

@ -22,7 +22,7 @@ function sumSquareDifference(n) {
return (sumOfN ** 2) - sumOfNSquare;
}
```
- [Run Code](https://repl.it/@ezioda004/Problem-6-Sum-square-difference)
### References:
- [Sum of n numbers - Wikipedia](https://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%E2%8B%AF)

View File

@ -44,6 +44,6 @@ function nthPrime(n) {
}
```
-[Run Code](https://repl.it/@ezioda004/Project-Euler-Problem-7-10001st-prime)
### References:
- [Wikipedia](https://en.wikipedia.org/wiki/Prime_number)

View File

@ -36,7 +36,6 @@ function largestProductinaSeries(n) {
console.log(largestProductinaSeries(13));
```
- [Run Code](https://repl.it/@ezioda004/Project-Euler-Problem-8-Largest-product-in-a-series)
### References:

View File

@ -27,7 +27,6 @@ function specialPythagoreanTriplet(n) {
specialPythagoreanTriplet(1000);
```
- [Run Code](https://repl.it/@ezioda004/Project-Euler-Problem-9-Special-Pythagorean-triplet)
### References:
- [Wikipedia](https://en.wikipedia.org/wiki/Pythagorean_triple)

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:

View File

@ -53,8 +53,6 @@ function testSize(num) {
}
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Chaining-ifelse-statements)
### Code explanation
The function first checks the `if` condition `(num < 5)`. If it evaluates to `true`, it returns the statement between the curly braces ("Tiny"). If it doesn't, it checks the next condition until the last `else` statement.

View File

@ -30,7 +30,6 @@ function testEqual(val) {
testEqual(10);
```
· [Run code at repl.it](https://repl.it/@AdrianSkar/Basic-JS-Equality-operator)
### Code explanation
The function first evaluates `if` the condition `(val == 12)` evaluates to `true`. If it does, it returns the statement between the curly braces ("Equal"). If it doesn't, it returns the next `return` statement outside them ("Not equal").

View File

@ -30,7 +30,6 @@ function testNotEqual(val) {
// Change this value to test
testNotEqual(10);
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Comparison-with-the-inequality-operator).
### Code explanation
The function first evaluates `if` the condition `(val != 99)` evaluates to `true`. If it does, it returns the statement between the curly braces ("Not equal"). If it doesn't, it returns the next `return` statement outside them ("Equal").

View File

@ -37,7 +37,6 @@ function testLogicalAnd(val) {
// Change this value to test
testLogicalAnd(10);
```
· [Run code at repl.it](https://repl.it/@AdrianSkar/Basic-JS-Comparison-with-the-and-operator)
### Code explanation
The function first evaluates `if` the condition `val <= 50` evaluates to `true` converting `val` to a number if necessary, then does the same with `val >=25` because of the logical AND (`&&`) operator; if both return true, the `return "Yes"` statement is executed.

View File

@ -118,7 +118,6 @@ function cc(card) {
// Only change code above this line
}
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Counting-cards).
### Code explanation
· The function first evaluates `if` the condition `card` is a value greater than `1` and lower than `7`, in which case it increments `count` by one.

View File

@ -27,7 +27,6 @@ function randomRange(myMin, myMax) {
}
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Random-whole-numbers-within-range).
### Code explanation
- `Math.random()` generates our random number between 0 and ≈ 0.9.

View File

@ -110,7 +110,6 @@ function golfScore(par, strokes) {
// Change these values to test
golfScore(5, 4);
```
·Run at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Golf-code)
## Code explanation
Since we already have an array defined in the variable `names` we can take advantage of it and use it for our return statements using indexes (eg: `names[0] is the first one`). That way, if you ever need to change a specific result you wouldn't need to look for it inside the function, it'd be at the beginning, in your array.
@ -129,7 +128,6 @@ Since we already have an array defined in the variable `names` we can take advan
"Change Me";
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/@greggubarev/Basic-JS-Golf-code1' target='_blank' rel='nofollow'>Run Code</a>
### Resources

View File

@ -71,7 +71,7 @@ function testElseIf(val) {
// Change this value to test
testElseIf(7);
```
:rocket: [Run code](https://repl.it/@RyanPisuena/GoldenWorriedRuntime)
## Code explanation
The structure of an **else-if logic flow** is an initial `if` statement, one more `if-else` statements, and one final `else` statement.

View File

@ -42,7 +42,6 @@ function testElse(val) {
// Change this value to test
testElse(4);
```
· [Run code at repl.it](https://repl.it/@AdrianSkar/Introducing-else-statements)
### Code explanation
The function first evaluates `if` the condition `val > 5` evaluates to `true`. If it doesn't, it executes the next statement (`else { return "5 or smaller";})`.

View File

@ -83,7 +83,6 @@ function sequentialSizes(val) {
// Change this value to test
sequentialSizes(1);
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Multiple-opts-in-switch).
### Code explanation
Since you already have a variable named `answer` defined and the function returns it, you can just modify its value on each group of case statements to fit the exercise requirements.

View File

@ -98,7 +98,6 @@ for (var i = 0; i < contacts.length; i++){
return "No such contact";
}
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Profile-lookup).
### Code explanation
This works as the last example but uses the `in` operator to look for `prop` instead of the `hasOwnProperty()` method.

View File

@ -70,7 +70,6 @@ To access the value of a key in this object, you will use `collection[id][prop]`
return collection;
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/C2AZ/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -38,7 +38,5 @@ function isLess(a, b) {
isLess(10, 15);
```
Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-Js-Returning-boolean-from-function).
### Resources
- ["Less than or equal operator (<=)" - *MDN JavaScript Reference*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Less_than_or_equal_operator_(%3C))

View File

@ -105,7 +105,6 @@ function caseInSwitch(val) {
// Change this value to test
caseInSwitch(1);
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Switch-statements).
### Code explanation
Since you already have a variable defined at the beginning of the function named `answer` and it's defined as the last return statement, you can assign new values to it for each case and will return the expected answer depending on the value you pass to the function.

View File

@ -28,7 +28,6 @@ function convertToInteger(str) {
}
convertToInteger("10011");
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Use-parseInt-with-radix).
### Code explanation
- The function takes `str` and returns an integer instead of a string but "understanding" its a binary number instead of a decimal one thanks to the `radix` parameter (2).

View File

@ -66,7 +66,6 @@ After converting our case statements into object properties you can make use of
result = lookup[val];
```
· Run code at [repl.it](https://repl.it/@AdrianSkar/Using-objects-for-lookups).
### Resources

View File

@ -48,7 +48,6 @@ const increment = (function() {
console.log(increment(5, 2)); // returns 7
console.log(increment(5)); // returns NaN
```
[Run Code](https://repl.it/@RyanPisuena/PleasingFumblingThings)
### Code Explanation

View File

@ -53,6 +53,10 @@ const squareList = (arr) => {
};
```
### Code explanation
This does basically the same but uses the `isInteger()` method to check the numbers.
### Resources
- ["Array.prototype.map()" - *MDN JavaScript reference*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)

View File

@ -58,7 +58,6 @@ Make sure that each time you transcode a character from binary to decimal, you r
// test here
binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnm/0' target='_blank' rel='nofollow'>Run Code</a>
# Code Explanation:
@ -109,7 +108,6 @@ Make sure that each time you transcode a character from binary to decimal, you r
// test here
binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLno/0' target='_blank' rel='nofollow'>Run Code</a>
# Code Explanation
@ -133,7 +131,6 @@ Make sure that each time you transcode a character from binary to decimal, you r
// test here
binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnp/0' target='_blank' rel='nofollow'>Run Code</a>
# Code Explanation

View File

@ -63,7 +63,6 @@ The best way to go about the callback function is to check if the number from th
diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href="https://repl.it/CLme/0">Run Code</a>
### Code Explanation:
@ -85,7 +84,6 @@ Read the comments in the code.
diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href="https://repl.it/CNYb/0">Run Code</a>
### Code Explanation:
@ -109,7 +107,6 @@ Explain solution here and add any relevant links
diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href="https://repl.it/CNYU/0">Run Code</a>
### Code Explanation:

View File

@ -81,7 +81,6 @@ This problem does not involve rearranging the input into different combinations
// test here
pairElement("GCG");
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLmz/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -112,7 +111,6 @@ This problem does not involve rearranging the input into different combinations
//test here
pairElement("GCG");
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/ThoroughSphericalComputeranimation' target='_blank' rel='nofollow'>Run Code</a>
## Code Explanation:

View File

@ -57,7 +57,6 @@ If you still can't figure out how to solve it with shift, then try solving it wi
// test here
dropElements([1, 2, 3, 4], function(n) {return n >= 3;})
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLna/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -79,7 +78,6 @@ If you still can't figure out how to solve it with shift, then try solving it wi
// test here
dropElements([1, 2, 3, 4], function(n) {return n >= 3;});
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/PositiveSandyObjectcode' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -104,7 +102,6 @@ If you still can't figure out how to solve it with shift, then try solving it wi
// test here
dropElements([1, 2, 3, 4], function(n) {return n >= 3;});
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnf/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation

View File

@ -59,7 +59,6 @@ You could use loops or callback functions, there are multiple ways to solve this
// test here
truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnw/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -85,7 +84,6 @@ You could use loops or callback functions, there are multiple ways to solve this
// test here
truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLny/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -106,7 +104,6 @@ You could use loops or callback functions, there are multiple ways to solve this
truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/E2u6/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -86,7 +86,6 @@ var Person = function(firstAndLast) {
var bob = new Person('Bob Ross');
bob.getFullName();
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLov/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -68,7 +68,6 @@ Find out how to remove and add key to a JavaScript object.
// test here
orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLow/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -109,7 +108,6 @@ Find out how to remove and add key to a JavaScript object.
// test here
orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLoy/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -139,7 +137,6 @@ Find out how to remove and add key to a JavaScript object.
// test here
orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLoz/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -59,7 +59,6 @@ You will need to figure out where the missing letter is, along with handling the
// test here
fearNotLetter("abce");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnD/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -96,7 +95,6 @@ You will need to figure out where the missing letter is, along with handling the
// test here
fearNotLetter("abce");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnE/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -143,7 +141,6 @@ You will need to figure out where the missing letter is, along with handling the
// test here
fearNotLetter("abce");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnG/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -55,7 +55,6 @@ You will create a program that takes a sentence, then search for a word in it an
// test here
myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLmo/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -90,7 +89,6 @@ You will create a program that takes a sentence, then search for a word in it an
// test here
myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLmp/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -136,7 +134,6 @@ You will create a program that takes a sentence, then search for a word in it an
// test here
myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLmq/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -195,7 +192,6 @@ You will create a program that takes a sentence, then search for a word in it an
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/@kr3at0/SearchAndReplace' target='_blank' rel='nofollow'>Run Code</a>
## ![:rotating_light:](https://forum.freecodecamp.com/images/emoji/emoji_one/rotating_light.png?v=3 ":rotating_light:") Advanced Code Solution Alternative 2:

View File

@ -51,7 +51,6 @@ To convert `arguments` into an array use this code `var args = Array.prototype.s
return arr.filter(Boolean);
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/95' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -81,7 +80,6 @@ To convert `arguments` into an array use this code `var args = Array.prototype.s
});
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/Ck2m/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -80,7 +80,6 @@ If you sort the array from greatest to smallest, then you can use the first two
// test here
smallestCommons([1,5]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLn2/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -136,7 +135,6 @@ Note: If the array only has two elements, then the `for` loop never gets used an
// test here
smallestCommons([1,5]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLn4/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -175,7 +173,6 @@ Note: If the array only has two elements, then the `for` loop never gets used an
// test here
smallestCommons([1,5]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/MR9P/latest' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -63,7 +63,6 @@ You will have to check if the current value is already on the array to be return
// test here
uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnM/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -120,7 +119,6 @@ uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
// test here
uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnO/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -152,7 +150,6 @@ uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
// test here
uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnN/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -181,7 +178,6 @@ uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
// test here
uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CcWk/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -54,7 +54,6 @@ The tricky part is getting the regular expression part to work, once you do that
// test here
spinalCase('This Is Spinal Tap');
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnS/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -74,7 +73,6 @@ The tricky part is getting the regular expression part to work, once you do that
// test here
spinalCase('This Is Spinal Tap');
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnT/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -95,7 +93,6 @@ The tricky part is getting the regular expression part to work, once you do that
return str.split(/\s|_|(?=[A-Z])/).join('-').toLowerCase()
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/EUZV' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -60,7 +60,6 @@ You will definitely need recursion or another way to go beyond two level arrays
// test here
steamrollArray([1, [2], [3, [[4]]]]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnh/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -84,7 +83,6 @@ You will definitely need recursion or another way to go beyond two level arrays
steamrollArray([1, [2], [3, [[4]]]]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLni/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -111,7 +109,6 @@ You will definitely need recursion or another way to go beyond two level arrays
steamrollArray([1, [2], [3, [[4]]]]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/ContentMiserlySweepsoftware' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -140,7 +137,6 @@ You will definitely need recursion or another way to go beyond two level arrays
});
}
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CpDy/4' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -45,7 +45,6 @@ Remember to that you must add all the numbers in between so this would require a
sumAll([1, 4]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLm6/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -77,7 +76,6 @@ Since the numbers might not be always in order, using `max()` and `min()` will h
return sum;
};
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLm7/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -104,7 +102,6 @@ Since the numbers might not be always in order, using `max()` and `min()` will h
sumAll([1, 4]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLm8/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -56,7 +56,6 @@ As you get the next odd one, don't forget to add it to a global variable that ca
// test here
sumFibs(4);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnV/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -95,7 +94,6 @@ As you get the next odd one, don't forget to add it to a global variable that ca
// test here
sumFibs(4);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/ImpassionedFineConnection' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -71,7 +71,6 @@ This problem is hard if you have to create your own code to check for primes, so
// test here
sumPrimes(10);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnZ/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -108,7 +107,6 @@ This problem is hard if you have to create your own code to check for primes, so
}
//test here
sumPrimes(10);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLnZ/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -152,7 +150,6 @@ This problem is hard if you have to create your own code to check for primes, so
// test here
sumPrimes(10);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLn0/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -177,7 +174,6 @@ This problem is hard if you have to create your own code to check for primes, so
// test here
sumPrimes(13);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/repls/FrigidFantasticFossil' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -205,7 +201,6 @@ This problem is hard if you have to create your own code to check for primes, so
// test here
sumPrimes(977);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/DoOo/3' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -60,7 +60,6 @@ Check equivalence of `Object` in `collection` with `Object` passed as second par
// test here
whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLmh/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -93,7 +92,6 @@ Check equivalence of `Object` in `collection` with `Object` passed as second par
// test here
whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLmi/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -130,7 +128,6 @@ Check equivalence of `Object` in `collection` with `Object` passed as second par
// test here
whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLmj/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -110,7 +110,6 @@ title: Cash Register
// test here
checkCashRegister(19.50, 20.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/@scissorsneedfoo/cash-register-example' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -49,7 +49,6 @@ The `Array.prototype.split` and `Array.prototype.join` methods can be of use her
str.replace(/[\W_]/g, '').toLowerCase().split('').reverse().join('');
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/2' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -79,7 +78,6 @@ The `Array.prototype.split` and `Array.prototype.join` methods can be of use her
return true;
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/3' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -125,7 +123,6 @@ The `Array.prototype.split` and `Array.prototype.join` methods can be of use her
}
```
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLjU/4' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -60,7 +60,6 @@ You can't have more than three consecutive Roman numerals together.
// test here
convertToRoman(36);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLmf/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -125,7 +124,6 @@ You can't have more than three consecutive Roman numerals together.
// test here
convertToRoman(97);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/C1YV' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -181,7 +179,6 @@ You can't have more than three consecutive Roman numerals together.
// test here
convertToRoman(36);
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/C1YV' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:

View File

@ -72,7 +72,6 @@ Start by trying to get it to validate each format from the example, each one sho
}
telephoneCheck("555-555-5555");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLo9/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation:
@ -98,7 +97,6 @@ Start by trying to get it to validate each format from the example, each one sho
}
telephoneCheck("555-555-5555");
![:rocket:](https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:") <a href='https://repl.it/CLoa/0' target='_blank' rel='nofollow'>Run Code</a>
### Code Explanation: