Intermediate algorithm FreeCodeCamp: Diff Two ArraysThe challenge from FreeCodeCamp: Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays. Note: You can return the array with ...May 24, 2021 · 3 min readcesaremannino.hashnode.dev
(JS) Return a string with the first letter of each word capitalized, with the rest of the other word in lower caseHere the code: function titleCase(str) { let lowArray = str.toLowerCase().split(" "); let outcome = lowArray.map(function(val){ return val.replace(val.charAt(0), val.charAt(0).toUpperCase()); }); return outcome.join(" "); } console.log(t...Mar 9, 2021 · 4 min readcesaremannino.hashnode.dev
JavaScript function which confirms the ending of a wordHere is the problem : We want to create a function that takes two arguments, both strings, and tell us if the second argument is the end of the string or not. For example, the first argument could be 'Cesare' and the second 'e' the function should gi...Mar 8, 2021 · 2 min readcesaremannino.hashnode.dev