From cde6cc4c05b34d8b39f58b5c9438684f5f452536 Mon Sep 17 00:00:00 2001 From: yewonee Date: Thu, 3 Apr 2025 13:43:42 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes hello01.js | 1 + prob1.js | 10 +++++++++- prob2.js | 10 +++++++++- prob3.js | 38 +++++++++++++++++++++++++++++++++++--- tempCodeRunnerFile.js | 13 +++++++++++++ 6 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 .DS_Store create mode 100644 hello01.js create mode 100644 tempCodeRunnerFile.js diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..af4d38dbb4e4c3f3b06bc43f5ad1e0c82d3deed8 GIT binary patch literal 6148 zcmeHKyH3ME5S$Gu9MOc12FV>=q(DbyBB!9BA)-f#r2tCgh=*w1^BZ&&`~@A~1hcnC z6z5eUK)cf3-0kDe9-q8-0HpU=bb&U2gsRwRu~{SPS6z`tw5U^bj>)(?7?so6N~9Zp zD+BuNn&@DR8$8s%-|OL`Z(8R0a8eFwOZHA)o-RM$PwW0-tABRAus3YyB$(k2C5Gto z32t$JHYrDO4c(ABf9Ep@d%6j~9nUYE{j+hS~|pzkdU~t#2bo))j59}!XcTVx6XhwP-kGrhHb6? z{mu9PdXkTv0cYS}F(A!+koWjXv9_+foYvZudPP;yxXN&z!cHi~jMY-SPYptQsvTk$ Tu`;BE;s=31gE!8=k23HDvnX0B literal 0 HcmV?d00001 diff --git a/hello01.js b/hello01.js new file mode 100644 index 0000000..6be0237 --- /dev/null +++ b/hello01.js @@ -0,0 +1 @@ +console.log('hello world'); diff --git a/prob1.js b/prob1.js index 2eed222..e50c115 100644 --- a/prob1.js +++ b/prob1.js @@ -1,7 +1,15 @@ //1. 함수 로직 작성 문제 function solution(num, total) { - let answer = []; + let answer = []; + let avg= total/num; + let start = avg- (num-1)/2; + + for(let i=0;i likelion[j].age) { + let temp = likelion[i]; + likelion[i] = likelion[j]; + likelion[j] = temp; + } + } +} +console.log("오름차순", likelion); -// 2번 문제 코드작성 + +// 2번 문제 코드작성 +// 나이를 돌면서 24세 이상인 경우에만 결과 배열에 푸시 해보기 let result2 = []; +let criteria= 24; +for (let i=0;i=criteria){ + result2.push(likelion[i]); + + } + + + +} console.log(result2); // 3번 문제 코드작성 +// 그냥 돌면서 이름 같은 사람찾고 foundPerson.part let targetName = "전수빈"; -let result3 = null; +let result3 = null; +for (let i=0;i