From 2dc864d89be86856b9437edeeb83387aa6804edf Mon Sep 17 00:00:00 2001 From: Fitsumhelina Date: Thu, 21 Nov 2024 20:50:15 +0300 Subject: [PATCH] 70% solved --- Test/01-js-refresher.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Test/01-js-refresher.js b/Test/01-js-refresher.js index 2771c0f..efc5f64 100644 --- a/Test/01-js-refresher.js +++ b/Test/01-js-refresher.js @@ -46,7 +46,14 @@ itCompanies.forEach(company => console.log(company)) // Change each company name to uppercase one by one and print them out itCompanies.forEach(company => console.log(company.toUpperCase())) // Print the array like as a sentence: Facebook, Google, Microsoft, Apple, IBM,Oracle and Amazon are big IT companies. +console.log(itCompanies.join(', ') + ' are big IT companies.') // Check if a certain company exists in the itCompanies array. If it exist return the company else return a company is not found +const company = 'Google' +if (itCompanies.includes(company)) { + console.log(company +'is found in the array.') +} else { + console.log(company +'is not found in the array.') +} // Filter out companies which have more than one 'o' without the filter method // Sort the array using sort() method // Reverse the array using reverse() method