[프로그래머스 0단계 :JS] 작성일 기준 정답률 67% - 로그인 성공?
안녕하세요 연하입니다. 이어서 정답률 67% 문제를 풀어보겠습니다. function solution(id_pw, db) { var answer = 'fail'; db.forEach(x => { if(x[0] === id_pw[0]){ answer = 'wrong pw'; } if(x[0] === id_pw[0] && x[1] === id_pw[1]){ answer = 'login'; } }) return answer; }
- 코테 준비/[JS] 프로그래머스
- · 2022. 12. 1.
[프로그래머스 0단계 :JS] 작성일 기준 정답률 68%
안녕하세요 연하입니다. 이어서 정답률 68% 문제입니다. 1. 컨트롤 제트 function solution(s) { s=s.split(' ') return s.map((x,i)=> x === 'Z'?x = -s[i-1]:parseInt(x)).reduce((a,b)=>a+b); } 2. 직사각형 넓이 구하기 function solution(dots) { var answer = 1; for(let i = 1; i(b+b).indexOf(a)
- 코테 준비/[JS] 프로그래머스
- · 2022. 12. 1.