From 45b2e4a3bce464ea9ec98ef94ef86daf8d73b4fc Mon Sep 17 00:00:00 2001 From: Abdulrahman Date: Sun, 9 Mar 2025 12:49:13 +0300 Subject: [PATCH] Heba, Abdulrahman --- src/functions.ts | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/functions.ts b/src/functions.ts index 674ff85..81e22fa 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -1,5 +1,6 @@ /** * greet(name): + * Heba, Abdulrahman * - Accepts a "name" parameter of type "string" * - logs "Hello " * @@ -8,6 +9,7 @@ */ function greet(name: string): void { // Your code here + console.log(`Hello ${name}`) } /** @@ -21,7 +23,7 @@ function greet(name: string): void { */ function isOdd(n: number): boolean { // Your code here - + if((n % 2) != 0) return true return false; // replace false with what you see is fit } @@ -36,8 +38,16 @@ function isOdd(n: number): boolean { */ function oddsSmallerThan(n: number): number { // Your code here - - return -1; // replace -1 with what you see is fit + let temp: string = "" + let count: number = 0 + for(let i = 0; i