Skip to content

Commit

Permalink
2024-03-29 배열 두배 만들기
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghdrn1399 committed Mar 29, 2024
1 parent 8b54ef2 commit 1ebc564
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions honggukang0623/배열/배열 두배 만들기.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function solution(numbers) {
var answer = [];


let cnt = 0;
while(cnt < numbers.length){
answer.push(numbers[cnt]*2);
cnt = cnt +1;
}
return answer;
}

0 comments on commit 1ebc564

Please sign in to comment.