This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ----------------------------------------------------------------- | |
| # .gitignore | |
| # Bare Minimum Git | |
| # http://ironco.de/bare-minimum-git/ | |
| # ver 20181206 | |
| # | |
| # From the root of your project run | |
| # curl -O https://gist.github.com/salcode/10017553/raw/.gitignore | |
| # to download this file | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function encode(text, openAlph, secureAlph) { | |
| let result = ""; | |
| let y = text; | |
| array = new Array(); | |
| for (i = 0; i < 26; i++) { | |
| array[openAlph.charAt(i)] = secureAlph.charAt(i); | |
| array[openAlph.charAt(i).toUpperCase()] = secureAlph | |
| .charAt(i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getArrays(number) { | |
| const result = [[], []]; | |
| if (Number.isInteger(number) === false) { | |
| return console.error("Function should get integer"); | |
| } else { | |
| if (Math.sign(number) === -1) { | |
| for (let i = -1; i > number - 1; i--) { | |
| if (i % 3 === 0) { | |
| result[0].push(i); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function checkAnagram(anagramArray) { | |
| let result = {}; | |
| if (anagramArray.length <= 1) { | |
| return false; | |
| } else { | |
| for (let word of anagramArray) { | |
| let cleansed = word.split("").sort().join(""); | |
| if (result[cleansed]) { | |
| result[cleansed].push(word); | |
| } else { |