Skip to content

Commit 5b6c7d2

Browse files
authored
update ex 12
1 parent a165022 commit 5b6c7d2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

solutions.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,25 +259,25 @@ console.log("daClub: ", daClub(22, 21));
259259
/*
260260
* #12
261261
* Function - graduation
262-
* Create a function named `graduation` which takes two parameters: `credits` and `thesis`.
262+
* Create a function named `graduation` which takes two parameters: `credits` and `grades`.
263263
*
264-
* @param Datatype: Number `credit`
265-
* @param Datatype: Boolean `thesis`
264+
* @param Datatype: Number `credits`
265+
* @param Datatype: Number `grades`
266266
* @return Datatype: String
267267
*
268-
* If EITHER the number value is greater than or equal to 120 or the boolean value is true, then the function will return the message: "Congratulations on a job well done." Otherwise, return the message: "See you in summer school."
268+
* If EITHER the credits value is greater than or equal to 120 or the grades value is greater than or equal to 2.0, then the function will return the message: "Congratulations on a job well done." Otherwise, return the message: "See you in summer school."
269269
* Console.log your result.
270-
*/
270+
*
271271
272-
function graduation(credits, thesis){
273-
if(credits >= 120 || thesis === true){
272+
function graduation(credits, grades){
273+
if(credits >= 120 || grades >= 2.0){
274274
return "Congratulations on a job well done.";
275275
}else{
276276
return "See you in summer school.";
277277
}
278278
}
279-
var gradResults = graduation(100, true);
280-
console.log("graduuation: ", gradResults);
279+
var gradResults = graduation(100, 3.0);
280+
console.log("graduation: ", gradResults);
281281
282282
/*
283283
* #13

0 commit comments

Comments
 (0)