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
| type Helper<T, K extends string | number> = Extract<T, Record<K, unknown>>; |
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
| const unriddle_me_1 = (str: string): string => { | |
| const length = Math.ceil(str.length / 2); | |
| const [a, b] = [str.slice(0, length), str.slice(length)]; | |
| return a.split('').reduce((acc, curr, idx) => { | |
| return acc + curr + (b[idx] || ''); | |
| }, ''); | |
| }; | |
| console.log( |