Skip to content

Commit 76bd705

Browse files
authored
Update index.ts
1 parent dcdf989 commit 76bd705

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)