diff --git a/loc.js b/loc.js new file mode 100644 index 000000000..e51395775 --- /dev/null +++ b/loc.js @@ -0,0 +1,3248 @@ + +> 30-seconds-of-code@0.0.1 localizer G:\My Files\git Repositories\30-seconds-of-code +> node ./scripts/localize.js + +module.exports = { +anagrams : { + description: `### anagrams + +⚠️ **WARNING**: This function's execution time increases exponentially with each character. Anything more than 8 to 10 characters will cause your browser to hang as it tries to solve all the different combinations. + +Generates all anagrams of a string (contains duplicates). + +Use recursion. +For each letter in the given string, create all the partial anagrams for the rest of its letters. +Use \`Array.map()\` to combine the letter with each partial anagram, then \`Array.reduce()\` to combine all anagrams in one array. +Base cases are for string \`length\` equal to \`2\` or \`1\`. + +`, + comments: [`// ['abc','acb','bac','bca','cab','cba']`], + hash: 'db57928e845bb3ddd75803bc9fb56e35682f0db49c44fc5bf49ce92ed7823ec2' +}, +arrayToHtmlList : { + description: `### arrayToHtmlList + +Converts the given array elements into \`