[Programmers] (Javascript) ํคํจ๋ ๋๋ฅด๊ธฐ
ยท
๐ฏ CodingTest/Programmers
function solution(numbers, hand) { var answer = ''; var keyPad = new Map([ ['1',[0,0]], ['2',[0,1]], ['3',[0,2]], ['4',[1,0]], ['5',[1,1]], ['6',[1,2]], ['7',[2,0]], ['8',[2,1]], ['9',[2,2]], ['*',[3,0]], ['0',[3,1]], ['#',[3,2]], ]); var lefthand = '*'; var righthand = '#'; for (const num of numbers) { if (num === 1 || num === 4 || num === 7) { answer += ('L'); lefthand = String(num); } else if..