feat(PermutateString.js): Array.prototype.map() -> Array.prototype.forEach()

This commit is contained in:
Rak Laptudirm
2021-05-21 12:35:12 +05:30
parent c62d169c21
commit 7992caa54f
2 changed files with 15 additions and 7 deletions

View File

@ -18,7 +18,7 @@ const permutate = (aString) => {
const calculateCurrentCharacterPermutation = (allPermutations, currentCharacter) => {
const currentPermutations = []
allPermutations.map(permutation => {
allPermutations.forEach(permutation => {
let index = 0
while (index <= permutation.length) {
const tmp = [...permutation]