From 6600096ebae2b70adac04255009b03d15b9f3322 Mon Sep 17 00:00:00 2001 From: snaked2018 Date: Tue, 3 Oct 2023 21:28:47 +0800 Subject: [PATCH] S22 Revision --- individual/backend/s22/activity/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/individual/backend/s22/activity/index.js b/individual/backend/s22/activity/index.js index b23f1e4..7f1ae24 100644 --- a/individual/backend/s22/activity/index.js +++ b/individual/backend/s22/activity/index.js @@ -117,12 +117,15 @@ console.log("Hello World"); Create a global variable called outside of the function called isPassingScore. -This variable should be able to receive and store the boolean result of the checker function. -Log the value of the isPassingScore variable in the console. -*/ - function checkIfPassed(x,y) { - console.log("Is " + x +"/"+ y +" a passing score?"); - return x <= y; +*/ let isPassed = 38; + let isPassingScore = 50; + + function checkIfPassed(isPassed,isPassingScore) { + console.log("Is " + isPassed +"/"+ isPassingScore +" a passing score?"); + return isPassed <= isPassingScore; } - console.log(checkIfPassed(38,50)); + console.log(checkIfPassed(isPassed,isPassingScore)); + //Do not modify