From 35efce22811b2f8d7028cb95cd6ad8ed90d09b08 Mon Sep 17 00:00:00 2001 From: AndBlack99 Date: Mon, 27 Jan 2025 11:14:20 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EB=8B=B5=EC=95=88=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problem01/problem01.js | 10 ++++------ problem02/problem02.js | 10 +++++----- problem03/problem03.js | 10 +++++----- problem04/problem04.js | 10 +++++----- problem05/problem05.js | 10 +++++----- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/problem01/problem01.js b/problem01/problem01.js index b2508bb..04b2f6d 100644 --- a/problem01/problem01.js +++ b/problem01/problem01.js @@ -9,13 +9,11 @@ * 모든 변수 선언 및 초기화가 올바르게 이루어지도록 수정해야 테스트를 통과할 수 있습니다. */ function manageVariables() { - a++; // 🚨 - let a = 2; - b += 1; // 🚨 + let a = 2; let b = 10; - let b = 20; // 🚨 - const c = 100; - c = 200; // 🚨 + b += 1; // 🚨 + b = 20; // 🚨 + const c = 200; // 🚨 return { a, b, c }; } module.exports = manageVariables; diff --git a/problem02/problem02.js b/problem02/problem02.js index 9b7e7c5..cb59f5b 100644 --- a/problem02/problem02.js +++ b/problem02/problem02.js @@ -9,11 +9,11 @@ */ function calcNumbers(a, b) { return { - sum: a - b, // 🚨 - diff: a + b, // 🚨 - product: a / b, // 🚨 - quotient: a * b, // 🚨 - remainder: a ** b, // 🚨 + sum: a + b, // 🚨 + diff: a - b, // 🚨 + product: a * b, // 🚨 + quotient: a / b, // 🚨 + remainder: a % b, // 🚨 }; } module.exports = calcNumbers; diff --git a/problem03/problem03.js b/problem03/problem03.js index 6ab78c5..01e7d75 100644 --- a/problem03/problem03.js +++ b/problem03/problem03.js @@ -10,11 +10,11 @@ */ function compareOps(a, b) { return { - looseEqual: a === b, // 🚨 - strictEqual: a == b, // 🚨 - notEqual: a != b, // 🚨 - greater: a < b, // 🚨 - less: a > b, // 🚨 + looseEqual: a == b, // 🚨 + strictEqual: a === b, // 🚨 + notEqual: a !== b, // 🚨 + greater: a > b, // 🚨 + less: a < b, // 🚨 }; } module.exports = compareOps; diff --git a/problem04/problem04.js b/problem04/problem04.js index cd17510..dbf94ed 100644 --- a/problem04/problem04.js +++ b/problem04/problem04.js @@ -15,11 +15,11 @@ */ function logicOps(a, b) { return { - andResult: a || b, // 🚨 - orResult: a && b, // 🚨 - notA: a, // 🚨 - notB: b, // 🚨 - ternary: a && b ? a : b, // 🚨 + andResult: a && b, // 🚨 + orResult: a || b, // 🚨 + notA: !a, // 🚨 + notB: !b, // 🚨 + ternary: a || b ? a : b, // 🚨 }; } module.exports = logicOps; diff --git a/problem05/problem05.js b/problem05/problem05.js index 3801ab2..fc8c3ed 100644 --- a/problem05/problem05.js +++ b/problem05/problem05.js @@ -21,11 +21,11 @@ function inspectValues() { let d = "hello"; // string return { - typeofA: typeof b, // 🚨 - typeofB: typeof d, // 🚨 - typeofC: typeof a, // 🚨 - typeofD: "null", // 🚨 - checkNull: b === undefined, // 🚨 + typeofA: typeof a, // 🚨 + typeofB: typeof b, // 🚨 + typeofC: typeof c, // 🚨 + typeofD: typeof d, // 🚨 + checkNull: a === undefined, // 🚨 }; } module.exports = inspectValues; From 9c8c491de5a5f64652182c08979f45a24655dcee Mon Sep 17 00:00:00 2001 From: AndBlack99 Date: Mon, 27 Jan 2025 11:40:14 +0900 Subject: [PATCH 2/3] commit --- problem04/problem04.js | 1 + 1 file changed, 1 insertion(+) diff --git a/problem04/problem04.js b/problem04/problem04.js index dbf94ed..c30cbab 100644 --- a/problem04/problem04.js +++ b/problem04/problem04.js @@ -21,5 +21,6 @@ function logicOps(a, b) { notB: !b, // 🚨 ternary: a || b ? a : b, // 🚨 }; + } module.exports = logicOps; From faf9bd842715c3fa0bea69b2066fb1ff5fdd2e9f Mon Sep 17 00:00:00 2001 From: AndBlack99 Date: Mon, 27 Jan 2025 11:46:51 +0900 Subject: [PATCH 3/3] commit --- problem01/problem01.js | 1 + 1 file changed, 1 insertion(+) diff --git a/problem01/problem01.js b/problem01/problem01.js index 04b2f6d..feb9ba4 100644 --- a/problem01/problem01.js +++ b/problem01/problem01.js @@ -16,4 +16,5 @@ function manageVariables() { const c = 200; // 🚨 return { a, b, c }; } + module.exports = manageVariables;