From 9aa95e11ac593471ea403344a81a1e4dcbdc86b1 Mon Sep 17 00:00:00 2001 From: email Date: Sat, 13 Feb 2021 09:35:55 +0200 Subject: [PATCH 1/3] init toy problem first toy problem is up --- min-Array-rama.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 min-Array-rama.js diff --git a/min-Array-rama.js b/min-Array-rama.js new file mode 100644 index 0000000..e69de29 From cc2580acfac1db680cd984b4c9f53c070c882add Mon Sep 17 00:00:00 2001 From: email Date: Sat, 13 Feb 2021 10:06:47 +0200 Subject: [PATCH 2/3] init toy problem fist problem rama,, --- min-Array-rama.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/min-Array-rama.js b/min-Array-rama.js index e69de29..cae5e25 100644 --- a/min-Array-rama.js +++ b/min-Array-rama.js @@ -0,0 +1,15 @@ +/** + * [1,10,5,-3,100] + * create a function that finds the minimum + * without using any pre build in function + */ + +function minimum(array) { + let min = Number.MAX_VALUE; + for (let i = 0; i < array.length; i++) { + if (array[i] < min) { + min = array[i]; + return min; + } + } +} \ No newline at end of file From de5a7cca5cd47b2f02ac69e60d5d06c2e115c3eb Mon Sep 17 00:00:00 2001 From: email Date: Sat, 13 Feb 2021 10:19:22 +0200 Subject: [PATCH 3/3] sec. problem --- sum-Array-rama.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sum-Array-rama.js diff --git a/sum-Array-rama.js b/sum-Array-rama.js new file mode 100644 index 0000000..e69de29