TypeScript基础(一)——交替合并字符串-牛翰网

TypeScript基础(一)——交替合并字符串

TypeScript基础(一)—— 交替合并字符串 题设:输入“abc”、“ef”,输出“aebfc”。 1、第一次尝试 function mergeAlternately(word1: string, word2: string): string { // 采用三元运算符...