From 3b920bd720f4a1f3b9db95b48e4ef50b48b3ec83 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 29 Oct 2022 18:04:33 +0200 Subject: [PATCH] Change some data --- solutions/day-01/level1.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/solutions/day-01/level1.js b/solutions/day-01/level1.js index 96fc427..b6af30d 100644 --- a/solutions/day-01/level1.js +++ b/solutions/day-01/level1.js @@ -10,4 +10,22 @@ let middleItem = lengtharraOfNumbers / 2; console.log(middleItem); //Get the last item const [lastItem] = arraOfNumbers.slice(-1); -console.log(lastItem); \ No newline at end of file +console.log(lastItem); + +const mixedDataTypes = [1, true, 'Helsinki', null, undefined,1234567890123452 ] +const lengthMixedDataTypes = mixedDataTypes.length; +//The length should be greater than 5 +console.log(lengthMixedDataTypes); + +const itCompanies = ["Facebook", "Google", "Microsoft", "Apple", "IBM", "Oracle", "Amazon"]; +console.log(itCompanies); + +//Print the first company +const firstCompany = itCompanies[0]; +console.log(firstCompany); + +const middleCompany = itCompanies[(itCompanies.length - 1) / 2]; +console.log(middleCompany); + +const lastCompany = itCompanies.slice(-1); +console.log(lastCompany); \ No newline at end of file