From 1de00605d20b2bd08e2f80e6111dfd51bba16de3 Mon Sep 17 00:00:00 2001 From: SaniieAsanova <114922239+SaniieAsanova@users.noreply.github.com> Date: Sat, 22 Oct 2022 10:15:59 +0200 Subject: [PATCH] Adding Home work3 Adding Home work3 --- 2-js-basics/2-functions-methods/assignment.md | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/2-js-basics/2-functions-methods/assignment.md b/2-js-basics/2-functions-methods/assignment.md index 4fbe387d..55b70a3d 100644 --- a/2-js-basics/2-functions-methods/assignment.md +++ b/2-js-basics/2-functions-methods/assignment.md @@ -10,4 +10,24 @@ See if you can create a function that has a mix of parameters and parameters wit | 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 | + + +function summ(x, y) { + console.log(x+y); +} + + +function ranNum() { + let min = 10; + let max = 100; + let rand = min + Math.random() * (max + 1 - min); + return Math.floor(rand); +} + +function bigNum(x,y) { + if (x > y) return x; + if (x < y) return y; +} + +console.log(bigNum(9, 4));