mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 01:18:23 +08:00
feat(PermutateString.js): Array.prototype.map() -> Array.prototype.forEach()
This commit is contained in:
@ -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]
|
||||
|
Reference in New Issue
Block a user