Skip to content

Commit 6064612

Browse files
authored
Merge pull request #35 from masx200/masx200-patch-1
Update index.ts
2 parents dcdf989 + 76bd705 commit 6064612

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shuffle-string/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export default function restoreString(s: string, indices: number[]): string {
22
//@ts-ignore
33
return Array.prototype.reduce
4+
//@ts-ignore
45
.call(s, (p, c, i) => ((p[indices[i]] = c), p), [...s])
56
.join("");
67
}

0 commit comments

Comments
 (0)