deno.land / x / masx200_leetcode_test@10.6.5 / merge-strings-alternately / index.ts
12345678910function mergeAlternately(word1: string, word2: string): string { return Array(2 * Math.max(word1.length, word2.length)) .fill(0) .map((_, i) => i % 2 ? word2[Math.floor(i / 2)] : word1[Math.floor(i / 2)] ) .join("");}export default mergeAlternately;
Version Info