From 2f6bf8be15298d8afdb131596a93874f9880345c Mon Sep 17 00:00:00 2001 From: diegobaena89 Date: Mon, 2 May 2022 00:56:28 -0300 Subject: [PATCH 1/3] chore: exercise level1 complete --- solutions/day-01/Level1.js | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 solutions/day-01/Level1.js diff --git a/solutions/day-01/Level1.js b/solutions/day-01/Level1.js new file mode 100644 index 0000000..c3e0c0d --- /dev/null +++ b/solutions/day-01/Level1.js @@ -0,0 +1,48 @@ +// Declare an empty array; +const emptyArray = []; +// Declare an array with more than 5 number of elements +const numberArray = [1, 2, 3, 4, 5]; +// Find the length of your array +console.log(numberArray.length); +// Get the first item, the middle item and the last item of the array +console.log(numberArray[0], numberArray[2], numberArray[4]); +// Declare an array called mixedDataTypes, put different data types in the array and find the length of the array. The array size should be greater than 5 +const mixedDataTypes = [1, true, "Diego", 10, false, "black"]; +// Print the number of companies in the array +console.log(mixedDataTypes.length); +// Declare an array variable name itCompanies and assign initial values Facebook, Google, Microsoft, Apple, IBM, Oracle and Amazon +const itCompanies = [ + "Facebook", + "Google", + "Microsoft", + "Apple", + "IBM", + "Oracle", + "Amazon", +]; +// Print the array using console.log() +console.log(itCompanies); +// Print the number of companies in the array +console.log(itCompanies.length); + +// Change each company name to uppercase one by one and print them out +for(let i = 0; i < itCompanies.length; i++) { + console.log(itCompanies[i].toUpperCase()); +} + +// Check if a certain company exists in the itCompanies array. If it exist return the company else return a company is not found +console.log(itCompanies.includes("Facebook")); +// Sort the array using sort() method +console.log(itCompanies.sort()); +// Reverse the array using reverse() method +console.log(itCompanies.reverse()); +// Slice out the first 3 companies from the array +console.log(itCompanies.slice(0, 2)); +// Slice out the last 3 companies from the array +console.log(itCompanies.slice(0, -4)); +// Remove the first IT company from the array +console.log('teste'); +console.log(itCompanies.shift()); +// Remove the last IT company from the array +console.log(itCompanies.pop()); + From fbdfbbe49e0743a5787814be777cd413e765b1e4 Mon Sep 17 00:00:00 2001 From: diegobaena89 Date: Mon, 2 May 2022 01:13:24 -0300 Subject: [PATCH 2/3] chore: exercise level1 complete --- solutions/day-01/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 solutions/day-01/index.html diff --git a/solutions/day-01/index.html b/solutions/day-01/index.html new file mode 100644 index 0000000..984d787 --- /dev/null +++ b/solutions/day-01/index.html @@ -0,0 +1,9 @@ + + + + 30DaysOfScript:Internal Script + + + + + \ No newline at end of file From 77a736955889415c5ae38a98f9ce056d187cb330 Mon Sep 17 00:00:00 2001 From: diegobaena89 Date: Tue, 17 May 2022 14:59:38 -0300 Subject: [PATCH 3/3] exercises day 02 --- solutions/day-01/Level2.js | 0 solutions/day-01/countries.js | 13 +++ solutions/day-01/index.html | 2 +- solutions/day-01/web_techs.js | 9 ++ solutions/day-02/index.html | 198 ++++++++++++++++++++++++++++++++++ 5 files changed, 221 insertions(+), 1 deletion(-) create mode 100644 solutions/day-01/Level2.js create mode 100644 solutions/day-01/countries.js create mode 100644 solutions/day-01/web_techs.js create mode 100644 solutions/day-02/index.html diff --git a/solutions/day-01/Level2.js b/solutions/day-01/Level2.js new file mode 100644 index 0000000..e69de29 diff --git a/solutions/day-01/countries.js b/solutions/day-01/countries.js new file mode 100644 index 0000000..f00a89e --- /dev/null +++ b/solutions/day-01/countries.js @@ -0,0 +1,13 @@ +const countries = [ + 'Albania', + 'Bolivia', + 'Canada', + 'Denmark', + 'Ethiopia', + 'Finland', + 'Germany', + 'Hungary', + 'Ireland', + 'Japan', + 'Kenya', + ] \ No newline at end of file diff --git a/solutions/day-01/index.html b/solutions/day-01/index.html index 984d787..c9629fe 100644 --- a/solutions/day-01/index.html +++ b/solutions/day-01/index.html @@ -4,6 +4,6 @@ 30DaysOfScript:Internal Script - + \ No newline at end of file diff --git a/solutions/day-01/web_techs.js b/solutions/day-01/web_techs.js new file mode 100644 index 0000000..24e835d --- /dev/null +++ b/solutions/day-01/web_techs.js @@ -0,0 +1,9 @@ +const webTechs = [ + 'HTML', + 'CSS', + 'JavaScript', + 'React', + 'Redux', + 'Node', + 'MongoDB', + ] \ No newline at end of file diff --git a/solutions/day-02/index.html b/solutions/day-02/index.html new file mode 100644 index 0000000..f590c67 --- /dev/null +++ b/solutions/day-02/index.html @@ -0,0 +1,198 @@ + + + + + + + + 30 Days Of React Challenge + + + + +
+ + + + + + + \ No newline at end of file