diff --git a/2-js-basics/2-functions-methods/assignment.md b/2-js-basics/2-functions-methods/assignment.md index 4fbe387d..fc27789d 100644 --- a/2-js-basics/2-functions-methods/assignment.md +++ b/2-js-basics/2-functions-methods/assignment.md @@ -8,6 +8,27 @@ See if you can create a function that has a mix of parameters and parameters wit ## Rubric +`function checkAge(name, surname, age) { + const userName = name; + const userSurname = surname; + const userAge = age; + + if (age > 18) { + return console.log( + `Hello ${name} ${surname}! You ready for work! Good luck!` + ); + } else { + return console.log( + `Hello ${name} ${surname}, sorry you too small for this project` + ); + } + } + + function addNumbers(a, b = 10) { + const result = a + b; + console.log(result); + }` + | Criteria | Exemplary | Adequate | Needs Improvement | | -------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------------- | -| | Solution is offered with two or more well-performing functions with diverse parameters | Working solution is offered with one function and few parameters | Solution has bugs | \ No newline at end of file +| | Solution is offered with two or more well-performing functions with diverse parameters | Working solution is offered with one function and few parameters | Solution has bugs |