From a22d6b4f61ab214533fb252a0509e169bf45efd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EC=84=A0=ED=99=94?= Date: Thu, 1 Feb 2024 12:08:19 +0900 Subject: [PATCH 1/2] first --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9daa8247..42ffb40b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store + node_modules From f431be3ee3457851588bb8bc8c51058774be45ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EC=84=A0=ED=99=94?= Date: Thu, 1 Feb 2024 12:17:32 +0900 Subject: [PATCH 2/2] forEach --- Challenge/dbtjsghk21/solve.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Challenge/dbtjsghk21/solve.js diff --git a/Challenge/dbtjsghk21/solve.js b/Challenge/dbtjsghk21/solve.js new file mode 100644 index 00000000..954444a4 --- /dev/null +++ b/Challenge/dbtjsghk21/solve.js @@ -0,0 +1,12 @@ +// write your codes +function solution(inputArray) { + const answer = []; + inputArray.forEach((item, index) => { + answer.push(item + "%"); + }); + return answer; +} +const answ = solution([100, 10, 20, 40]); +console.log(answ); + +exports.solution = solution;