From 8ec8b3650b43d49228b3591f74ba0a3dd3515cbe Mon Sep 17 00:00:00 2001 From: Patrick Njuguna Date: Mon, 6 Jan 2020 06:20:04 +0300 Subject: [PATCH] array using splits example fix to avoid using already defined text property definition --- 05_Day/05_day_arrays.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/05_Day/05_day_arrays.md b/05_Day/05_day_arrays.md index e0e327f..d63cfda 100644 --- a/05_Day/05_day_arrays.md +++ b/05_Day/05_day_arrays.md @@ -137,9 +137,9 @@ let companiesString = 'Facebook, Google, Microsoft, Apple, IBM, Oracle, Amazon' const companies = companiesString.split(',') console.log(companies) // ["Facebook", " Google", " Microsoft", " Apple", " IBM", " Oracle", " Amazon"] -let text = +let txt = 'I love teaching and empowering people. I teach HTML, CSS, JS, React, Python.' -const words = text.split(' ') +const words = txt.split(' ') console.log(words) // the text has special characters think how you can just get only the words @@ -721,4 +721,4 @@ const webTechs = [ 🎉 CONGRATULATIONS ! 🎉 -[<< Day 4](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/04_Day/04_day_conditionals.md) | [Day 6 >>](#) \ No newline at end of file +[<< Day 4](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/04_Day/04_day_conditionals.md) | [Day 6 >>](#)