S22 Revision

master
Ron Reciproco 1 year ago
parent 7b619e8720
commit 6600096eba

@ -117,12 +117,15 @@ console.log("Hello World");
Create a global variable called outside of the function called isPassingScore. 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. -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. -Log the value of the isPassingScore variable in the console.
*/ */ let isPassed = 38;
function checkIfPassed(x,y) { let isPassingScore = 50;
console.log("Is " + x +"/"+ y +" a passing score?");
return x <= y; 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 //Do not modify

Loading…
Cancel
Save