🏠
Working from home
mom/designer/developer/crypto trader/loan creditor/investor/blockchain supporter
-
Aston Webdesign
- Netherlands
- @Luckerella
Pinned Loading
-
[Map The Debris] Return a new array ...
[Map The Debris] Return a new array that transforms the elements' average altitude into their orbital periods (in seconds). The array will contain objects in the format {name: 'name', avgAlt: avgAlt}. The values should be rounded to the nearest whole number. The body being orbited is Earth. The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418 km3s-2. #algorithm #intermediate #freecodecamp 1function orbitalPeriod(arr) {
2const GM = 398600.4418;
3const earthRadius = 6367.4447;
45for (let i = 0; i < arr.length; i++) {
-
[Palindrome Checker] Return true if ...
[Palindrome Checker] Return true if the given string is a palindrome. Otherwise, return false. A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing. Note You'll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes. We'll pass strings with varying formats, such as "racecar", "RaceCar", and "race CAR" among others. We'll also pass strings with special symbols, such as "2A3*3a2", "2A3 3a2", and "2_A3*3#A2". #freecodecamp #finalproject 1function palindrome(str) {
2// Good luck!
3const arr = str.toLowerCase().split("");
4const newArr = arr.filter((val) => val.match(/[a-z0-9]/));
5const revArr = [...newArr];
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.