-
[알고리즘/자바스크립트] 홀수 짝수 판별하여 map()으로 배열 재구성하기 (WeIrD StRiNg CaSe)Algorithm 2019. 2. 19. 22:28
-해당 문제는 codewars사이트의 level6 문제입니다. (1~8단계 중 8단계가 가장 쉬운 레벨)- [문제] Write a function toWeirdCase (weirdcase in Ruby) that accepts a string, and returns the same string with all even indexed characters in each word upper cased, and all odd indexed characters in each word lower cased. The indexing just explained is zero based, so the zero-ith index is even, therefore that character should be upper ca..