😎풀이

  1. ()o로 변환
  2. (al)al로 변환
  3. 변환된 문자를 반환환
function interpret(command: string): string {
    const parsed = command
        .replaceAll(/\(\)/gi, 'o')
        .replaceAll(/\(al\)/gi, 'al')
    return parsed
};
profile
내 지식을 공유할 수 있는 대담함

0개의 댓글