From 0f2fae8824ef83369b794479dd5ed111c1c44964 Mon Sep 17 00:00:00 2001 From: Jose Linardo Date: Mon, 16 May 2022 18:11:03 -0500 Subject: [PATCH] Soluciones dia 5 --- 05_Day_Arrays/05_day_starter/scripts/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/05_Day_Arrays/05_day_starter/scripts/main.js b/05_Day_Arrays/05_day_starter/scripts/main.js index 23a97e4..7e1bd0b 100644 --- a/05_Day_Arrays/05_day_starter/scripts/main.js +++ b/05_Day_Arrays/05_day_starter/scripts/main.js @@ -114,9 +114,9 @@ let text = 'I love teaching and empowering people. I teach HTML, CSS, JS, React, Python.' console.log(text) let replace = text.replace(/[^\w ]/g, ''); -console.log(replace) +console.log(replace); const words = text.split(' ') -console.log(words) +console.log(words); console.log(words.length) //3. In the following shopping cart add, remove, edit items @@ -183,7 +183,7 @@ const average = Math.round(ages.reduce((a,b) => a+b) / ages.length) console.log(`The average from ages is ${average}`) //°Find the range of the ages(max minus min) -let range = console.log(max - min) +let range = console.log(max - min); //°Compare the value of (min - average) and (max - average), use abs() console.log(Math.abs(min-average))