Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[javascript] prob8238_2219 #362

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1b7aaad
중복된 파일 제거
sanghee01 Dec 23, 2024
d96b263
solve: 전화번호 목록
sanghee01 Dec 23, 2024
c4d58cf
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Dec 24, 2024
8e17a23
solve: 짝지어 제거하기
sanghee01 Dec 24, 2024
7c3255c
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Dec 31, 2024
d0d2330
docs: 중복 파일 제거
sanghee01 Dec 31, 2024
bb77bf8
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 1, 2025
ff582fc
solve: 이진 변환 반복하기
sanghee01 Jan 1, 2025
152ff76
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 2, 2025
aadbdb2
solve: JadenCase 문자열 만들기
sanghee01 Jan 2, 2025
4b3b521
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 3, 2025
704750d
solve: 카펫
sanghee01 Jan 3, 2025
6682551
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 4, 2025
a493bf4
solve: 숫자의 표현
sanghee01 Jan 4, 2025
5f46fb1
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 5, 2025
420d9f9
solve: 영어 끝말잇기
sanghee01 Jan 5, 2025
0269515
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 6, 2025
9bb6c53
solve: 대표값2
sanghee01 Jan 6, 2025
cb8a5a4
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 8, 2025
6fce51f
solve: 스택2
sanghee01 Jan 8, 2025
54396e9
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 11, 2025
fc1ee48
solve: 괄호 회전하기
sanghee01 Jan 11, 2025
d1c7a6e
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 14, 2025
8025631
solve: 점프와 순간 이동
sanghee01 Jan 14, 2025
d9301c6
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 15, 2025
98f0fff
solve: 다음 큰 숫자
sanghee01 Jan 15, 2025
8e74c6a
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 16, 2025
c32a9c0
solve: 듣보잡
sanghee01 Jan 16, 2025
96a9261
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 17, 2025
3f9b42d
solve: 피보나치 수
sanghee01 Jan 17, 2025
11f6611
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 20, 2025
6d2faa1
solve: 의상
sanghee01 Jan 20, 2025
d8becba
Merge branch 'main' of https://github.com/geultto/daily-solvetto
sanghee01 Jan 22, 2025
c848686
solve: 로그인 성공?
sanghee01 Jan 22, 2025
785db37
Add solution for prob8238_2219
sanghee01 Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions sanghee/javascript/prob8238_2219.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function solution([id, pw], db) {
let answer = "fail";
const database = new Map(db);

if (database.has(id)) {
answer = database.get(id) === pw ? "login" : "wrong pw";
}

return answer;
}

console.log(
solution(
["meosseugi", "1234"],
[
["rardss", "123"],
["yyoom", "1234"],
["meosseugi", "1234"],
]
)
);
21 changes: 21 additions & 0 deletions sanghee/javascript/로그인 성공.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function solution([id, pw], db) {
let answer = "fail";
const database = new Map(db);

if (database.has(id)) {
answer = database.get(id) === pw ? "login" : "wrong pw";
}

return answer;
}

console.log(
solution(
["meosseugi", "1234"],
[
["rardss", "123"],
["yyoom", "1234"],
["meosseugi", "1234"],
]
)
);