From efb7691254233510101a7705ebb1fb1e651b52c9 Mon Sep 17 00:00:00 2001 From: Roozbehshokri1990 <108986775+Roozbehshokri1990@users.noreply.github.com> Date: Fri, 9 Dec 2022 13:01:12 +0000 Subject: [PATCH] js-core1-week3 --- 1-exercises/B-while-loop/exercise.js | 4 ++++ 1-exercises/D-do-while/exercise.js | 10 +++++++++- 1-exercises/E-for-loop/exercise1.js | 3 +++ 1-exercises/E-for-loop/exercise2.js | 3 +++ 1-exercises/F-for-of-loop/exercise.js | 7 ++++++- 2-mandatory/2-retrying-random-numbers.js | 5 ++++- 2-mandatory/3-financial-times.js | 20 ++++++++++++++++++-- 2-mandatory/4-stocks.js | 10 +++++++++- 8 files changed, 56 insertions(+), 6 deletions(-) diff --git a/1-exercises/B-while-loop/exercise.js b/1-exercises/B-while-loop/exercise.js index b459888f..2d2a216e 100644 --- a/1-exercises/B-while-loop/exercise.js +++ b/1-exercises/B-while-loop/exercise.js @@ -6,6 +6,10 @@ */ function evenNumbers(n) { + let numbers = [0,2,4,6,8,10,12,14,16,18]; + for(i=0; i50) } /* ======= TESTS - DO NOT MODIFY ===== */ diff --git a/2-mandatory/3-financial-times.js b/2-mandatory/3-financial-times.js index 2ce6fb73..966dacc8 100644 --- a/2-mandatory/3-financial-times.js +++ b/2-mandatory/3-financial-times.js @@ -5,7 +5,13 @@ Implement the function below, which will return a new array containing only article titles which will fit. */ function potentialHeadlines(allArticleTitles) { - // TODO + let newArr = []; + for(let i=0;i