Write a JavaScript function that takes in a candidate's score on a coding test and returns "Passed" if the score is above 70, and "Failed" if the score is 70 or below.
Write a JavaScript function that takes in a candidate's score on a cod
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Abhishek YadavRank #217 · 11.3K reputationPosted Mar 1, 2024, 7:22 AM EST
function checkScore(score) { if (score > 70) { return "Passed"; } else { return "Failed"; } } // Test the function console.log(checkScore(85)); // Output: Passed console.log(checkScore(60)); // Output: Failed