diff --git a/Portuguese/02_Day_Data_types/day_1_2.png b/Portuguese/02_Day_Data_types/day_1_2.png deleted file mode 100644 index 0f6eefb1..00000000 Binary files a/Portuguese/02_Day_Data_types/day_1_2.png and /dev/null differ diff --git a/Portuguese/02_Day_Data_types/math_object.js b/Portuguese/02_Day_Data_types/math_object.js deleted file mode 100644 index 784b2ae8..00000000 --- a/Portuguese/02_Day_Data_types/math_object.js +++ /dev/null @@ -1,34 +0,0 @@ -const PI = Math.PI -console.log(PI) // 3.141592653589793 -console.log(Math.round(PI)) // 3; to round values to the nearest number -console.log(Math.round(9.81)) // 10 -console.log(Math.floor(PI)) // 3; rounding down -console.log(Math.ceil(PI)) // 4; rounding up -console.log(Math.min(-5, 3, 20, 4, 5, 10)) // -5, returns the minimum value -console.log(Math.max(-5, 3, 20, 4, 5, 10)) // 20, returns the maximum value - -const randNum = Math.random() // creates random number between 0 to 0.999999 -console.log(randNum) -// Let create random number between 0 to 10 -const num = Math.floor(Math.random() * 11) // creates random number between 0 and 10 -console.log(num) - -//Absolute value -console.log(Math.abs(-10)) //10 -//Square root -console.log(Math.sqrt(100)) // 10 -console.log(Math.sqrt(2)) //1.4142135623730951 -// Power -console.log(Math.pow(3, 2)) // 9 -console.log(Math.E) // 2.718 - -// Logarithm -//Returns the natural logarithm of base E of x, Math.log(x) -console.log(Math.log(2)) // 0.6931471805599453 -console.log(Math.log(10)) // 2.302585092994046 - -// Trigonometry -console.log(Math.sin(0)) -console.log(Math.sin(60)) -console.log(Math.cos(0)) -console.log(Math.cos(60)) diff --git a/Portuguese/02_Day_Data_types/non_primitive_data_types.js b/Portuguese/02_Day_Data_types/non_primitive_data_types.js deleted file mode 100644 index 23d7fa28..00000000 --- a/Portuguese/02_Day_Data_types/non_primitive_data_types.js +++ /dev/null @@ -1,30 +0,0 @@ -let nums = [1, 2, 3] -nums[0] = 10 -console.log(nums) // [10, 2, 3] - -let nums = [1, 2, 3] -let numbers = [1, 2, 3] -console.log(nums == numbers) // false - -let userOne = { - name: 'Asabeneh', - role: 'teaching', - country: 'Finland' -} -let userTwo = { - name: 'Asabeneh', - role: 'teaching', - country: 'Finland' -} -console.log(userOne == userTwo) // false - -let numbers = nums -console.log(nums == numbers) // true - -let userOne = { -name:'Asabeneh', -role:'teaching', -country:'Finland' -} -let userTwo = userOne -console.log(userOne == userTwo) // true \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/number_data_types.js b/Portuguese/02_Day_Data_types/number_data_types.js deleted file mode 100644 index b850af92..00000000 --- a/Portuguese/02_Day_Data_types/number_data_types.js +++ /dev/null @@ -1,9 +0,0 @@ -let age = 35 -const gravity = 9.81 //we use const for non-changing values, gravitational constant in m/s2 -let mass = 72 // mass in Kilogram -const PI = 3.14 // pi a geometrical constant - -//More Examples -const boilingPoint = 100 // temperature in oC, boiling point of water which is a constant -const bodyTemp = 37 // oC average human body temperature, which is a constant -console.log(age, gravity, mass, PI, boilingPoint, bodyTemp) diff --git a/Portuguese/02_Day_Data_types/primitive_data_types.js b/Portuguese/02_Day_Data_types/primitive_data_types.js deleted file mode 100644 index d3c298c3..00000000 --- a/Portuguese/02_Day_Data_types/primitive_data_types.js +++ /dev/null @@ -1,14 +0,0 @@ -let word = 'JavaScript' -// we dont' modify string -// we don't do like this, word[0] = 'Y' -let numOne = 3 -let numTwo = 3 -console.log(numOne == numTwo) // true - -let js = 'JavaScript' -let py = 'Python' -console.log(js == py) //false - -let lightOn = true -let lightOff = false -console.log(lightOn == lightOff) // false \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_concatenation.js b/Portuguese/02_Day_Data_types/string_concatenation.js deleted file mode 100644 index 516ca1a9..00000000 --- a/Portuguese/02_Day_Data_types/string_concatenation.js +++ /dev/null @@ -1,19 +0,0 @@ -// Declaring different variables of different data types -let space = ' ' -let firstName = 'Asabeneh' -let lastName = 'Yetayeh' -let country = 'Finland' -let city = 'Helsinki' -let language = 'JavaScript' -let job = 'teacher' -// Concatenating using addition operator -let fullName = firstName + space + lastName // concatenation, merging two string together. -console.log(fullName) - -let personInfoOne = fullName + '. I am ' + age + '. I live in ' + country // ES5 -console.log(personInfoOne) -// Concatenation: Template Literals(Template Strings) -let personInfoTwo = `I am ${fullName}. I am ${age}. I live in ${country}.` //ES6 - String interpolation method -let personInfoThree = `I am ${fullName}. I live in ${city}, ${country}. I am a ${job}. I teach ${language}.` -console.log(personInfoTwo) -console.log(personInfoThree) \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_data_types.js b/Portuguese/02_Day_Data_types/string_data_types.js deleted file mode 100644 index fd611502..00000000 --- a/Portuguese/02_Day_Data_types/string_data_types.js +++ /dev/null @@ -1,7 +0,0 @@ -let space = ' ' // an empty space string -let firstName = 'Asabeneh' -let lastName = 'Yetayeh' -let country = 'Finland' -let city = 'Helsinki' -let language = 'JavaScript' -let job = 'teacher' diff --git a/Portuguese/02_Day_Data_types/string_methods/accessing_character.js b/Portuguese/02_Day_Data_types/string_methods/accessing_character.js deleted file mode 100644 index 32229fb6..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/accessing_character.js +++ /dev/null @@ -1,12 +0,0 @@ -// Let us access the first character in 'JavaScript' string. - -let string = 'JavaScript' -let firstLetter = string[0] -console.log(firstLetter) // J -let secondLetter = string[1] // a -let thirdLetter = string[2] -let lastLetter = string[9] -console.log(lastLetter) // t -let lastIndex = string.length - 1 -console.log(lastIndex) // 9 -console.log(string[lastIndex]) // t diff --git a/Portuguese/02_Day_Data_types/string_methods/char_at.js b/Portuguese/02_Day_Data_types/string_methods/char_at.js deleted file mode 100644 index 7daaf746..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/char_at.js +++ /dev/null @@ -1,6 +0,0 @@ -// charAt(): Takes index and it returns the value at that index -string.charAt(index) -let string = '30 Days Of JavaScript' -console.log(string.charAt(0)) // 3 -let lastIndex = string.length - 1 -console.log(string.charAt(lastIndex)) // t diff --git a/Portuguese/02_Day_Data_types/string_methods/char_code_at.js b/Portuguese/02_Day_Data_types/string_methods/char_code_at.js deleted file mode 100644 index e58baaa7..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/char_code_at.js +++ /dev/null @@ -1,7 +0,0 @@ -// charCodeAt(): Takes index and it returns char code(ASCII number) of the value at that index - -string.charCodeAt(index) -let string = '30 Days Of JavaScript' -console.log(string.charCodeAt(3)) // D ASCII number is 51 -let lastIndex = string.length - 1 -console.log(string.charCodeAt(lastIndex)) // t ASCII is 116 diff --git a/Portuguese/02_Day_Data_types/string_methods/concat.js b/Portuguese/02_Day_Data_types/string_methods/concat.js deleted file mode 100644 index 8b8192ac..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/concat.js +++ /dev/null @@ -1,6 +0,0 @@ -// concat(): it takes many substrings and creates concatenation. -// string.concat(substring, substring, substring) -let string = '30' -console.log(string.concat("Days", "Of", "JavaScript")) // 30DaysOfJavaScript -let country = 'Fin' -console.log(country.concat("land")) // Finland diff --git a/Portuguese/02_Day_Data_types/string_methods/ends_with.js b/Portuguese/02_Day_Data_types/string_methods/ends_with.js deleted file mode 100644 index 0ce5f1f0..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/ends_with.js +++ /dev/null @@ -1,11 +0,0 @@ -// endsWith: it takes a substring as an argument and it checks if the string starts with that specified substring. It returns a boolean(true or false). -// string.endsWith(substring) -let string = 'Love is the best to in this world' -console.log(string.endsWith('world')) // true -console.log(string.endsWith('love')) // false -console.log(string.endsWith('in this world')) // true - -let country = 'Finland' -console.log(country.endsWith('land')) // true -console.log(country.endsWith('fin')) // false -console.log(country.endsWith('Fin')) // false diff --git a/Portuguese/02_Day_Data_types/string_methods/includes.js b/Portuguese/02_Day_Data_types/string_methods/includes.js deleted file mode 100644 index 3fbe8e06..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/includes.js +++ /dev/null @@ -1,14 +0,0 @@ -// includes(): It takes a substring argument and it check if substring argument exists in the string. includes() returns a boolean. It checks if a substring exist in a string and it returns true if it exists and false if it doesn't exist. -let string = '30 Days Of JavaScript' -console.log(string.includes('Days')) // true -console.log(string.includes('days')) // false -console.log(string.includes('Script')) // true -console.log(string.includes('script')) // false -console.log(string.includes('java')) // false -console.log(string.includes('Java')) // true - -let country = 'Finland' -console.log(country.includes('fin')) // false -console.log(country.includes('Fin')) // true -console.log(country.includes('land')) // true -console.log(country.includes('Land')) // false \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/index_of.js b/Portuguese/02_Day_Data_types/string_methods/index_of.js deleted file mode 100644 index 480db7c0..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/index_of.js +++ /dev/null @@ -1,11 +0,0 @@ -// indexOf(): Takes takes a substring and if the substring exists in a string it returns the first position of the substring if does not exist it returns -1 - -string.indexOf(substring) -let string = '30 Days Of JavaScript' -console.log(string.indexOf('D')) // 3 -console.log(string.indexOf('Days')) // 3 -console.log(string.indexOf('days')) // -1 -console.log(string.indexOf('a')) // 4 -console.log(string.indexOf('JavaScript')) // 11 -console.log(string.indexOf('Script')) //15 -console.log(string.indexOf('script')) // -1 diff --git a/Portuguese/02_Day_Data_types/string_methods/last_index_of.js b/Portuguese/02_Day_Data_types/string_methods/last_index_of.js deleted file mode 100644 index 2134d227..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/last_index_of.js +++ /dev/null @@ -1,6 +0,0 @@ -// lastIndexOf(): Takes takes a substring and if the substring exists in a string it returns the last position of the substring if it does not exist it returns -1 - -let string = 'I love JavaScript. If you do not love JavaScript what else can you love.' -console.log(string.lastIndexOf('love')) // 67 -console.log(string.lastIndexOf('you')) // 63 -console.log(string.lastIndexOf('JavaScript')) // 38 diff --git a/Portuguese/02_Day_Data_types/string_methods/length.js b/Portuguese/02_Day_Data_types/string_methods/length.js deleted file mode 100644 index 070476f5..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/length.js +++ /dev/null @@ -1,6 +0,0 @@ -// length: The string length method returns the number of characters in a string included empty space. Example: - -let js = 'JavaScript' -console.log(js.length) // 10 -let firstName = 'Asabeneh' -console.log(firstName.length) // 8 \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/match.js b/Portuguese/02_Day_Data_types/string_methods/match.js deleted file mode 100644 index 40d1ffd6..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/match.js +++ /dev/null @@ -1,22 +0,0 @@ -// match: it takes a substring or regular expression pattern as an argument and it returns an array if there is match if not it returns null. Let us see how a regular expression pattern looks like. It starts with / sign and ends with / sign. -let string = 'love' -let patternOne = /love/ // with out any flag -let patternTwo = /love/gi // g-means to search in the whole text, i - case insensitive -string.match(substring) -let string = 'I love JavaScript. If you do not love JavaScript what else can you love.' -console.log(string.match('love')) // -/* -output - -["love", index: 2, input: "I love JavaScript. If you do not love JavaScript what else can you love.", groups: undefined] -*/ -let pattern = /love/gi -console.log(string.match(pattern)) // ["love", "love", "love"] -// Let us extract numbers from text using regular expression. This is not regular expression section, no panic. - -let txt = 'In 2019, I run 30 Days of Python. Now, in 2020 I super exited to start this challenge' -let regEx = /\d/g // d with escape character means d not a normal d instead acts a digit -// + means one or more digit numbers, -// if there is g after that it means global, search everywhere. -console.log(txt.match(regEx)) // ["2", "0", "1", "9", "3", "0", "2", "0", "2", "0"] -console.log(txt.match(/\d+/g)) // ["2019", "30", "2020"] diff --git a/Portuguese/02_Day_Data_types/string_methods/repeat.js b/Portuguese/02_Day_Data_types/string_methods/repeat.js deleted file mode 100644 index bf8e022d..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/repeat.js +++ /dev/null @@ -1,4 +0,0 @@ -// repeat(): it takes a number argument and it returned the repeated version of the string. -// string.repeat(n) -let string = 'love' -console.log(string.repeat(10)) // lovelovelovelovelovelovelovelovelovelove \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/replace.js b/Portuguese/02_Day_Data_types/string_methods/replace.js deleted file mode 100644 index 33f324cc..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/replace.js +++ /dev/null @@ -1,7 +0,0 @@ -// replace(): takes to parameter the old substring and new substring. -// string.replace(oldsubstring, newsubstring) - -let string = '30 Days Of JavaScript' -console.log(string.replace('JavaScript', 'Python')) // 30 Days Of Python -let country = 'Finland' -console.log(country.replace('Fin', 'Noman')) // Nomanland \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/search.js b/Portuguese/02_Day_Data_types/string_methods/search.js deleted file mode 100644 index e1ea82e9..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/search.js +++ /dev/null @@ -1,4 +0,0 @@ -// search: it takes a substring as an argument and it returns the index of the first match. -// string.search(substring) -let string = 'I love JavaScript. If you do not love JavaScript what else can you love.' -console.log(string.search('love')) // 2 diff --git a/Portuguese/02_Day_Data_types/string_methods/split.js b/Portuguese/02_Day_Data_types/string_methods/split.js deleted file mode 100644 index f955bcc4..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/split.js +++ /dev/null @@ -1,10 +0,0 @@ -// split(): The split method splits a string at a specified place. -let string = '30 Days Of JavaScript' -console.log(string.split()) // ["30 Days Of JavaScript"] -console.log(string.split(' ')) // ["30", "Days", "Of", "JavaScript"] -let firstName = 'Asabeneh' -console.log(firstName.split()) // ["Asabeneh"] -console.log(firstName.split('')) // ["A", "s", "a", "b", "e", "n", "e", "h"] -let countries = 'Finland, Sweden, Norway, Denmark, and Iceland' -console.log(countries.split(',')) // ["Finland", " Sweden", " Norway", " Denmark", " and Iceland"] -console.log(countries.split(', ')) // ["Finland", "Sweden", "Norway", "Denmark", "and Iceland"] \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/starts_with.js b/Portuguese/02_Day_Data_types/string_methods/starts_with.js deleted file mode 100644 index a89ee3b7..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/starts_with.js +++ /dev/null @@ -1,11 +0,0 @@ -// startsWith: it takes a substring as an argument and it checks if the string starts with that specified substring. It returns a boolean(true or false). -// string.startsWith(substring) -let string = 'Love is the best to in this world' -console.log(string.startsWith('Love')) // true -console.log(string.startsWith('love')) // false -console.log(string.startsWith('world')) // false - -let country = 'Finland' -console.log(country.startsWith('Fin')) // true -console.log(country.startsWith('fin')) // false -console.log(country.startsWith('land')) // false diff --git a/Portuguese/02_Day_Data_types/string_methods/substr.js b/Portuguese/02_Day_Data_types/string_methods/substr.js deleted file mode 100644 index 0bea56d5..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/substr.js +++ /dev/null @@ -1,5 +0,0 @@ -//substr(): It takes two arguments,the starting index and number of characters to slice. -let string = 'JavaScript' -console.log(string.substr(4,6)) // Script -let country = 'Finland' -console.log(country.substr(3, 4)) // land \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/substring.js b/Portuguese/02_Day_Data_types/string_methods/substring.js deleted file mode 100644 index 3fac3a16..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/substring.js +++ /dev/null @@ -1,9 +0,0 @@ -// substring(): It takes two arguments,the starting index and the stopping index but it doesn't include the stopping index. -let string = 'JavaScript' -console.log(string.substring(0,4)) // Java -console.log(string.substring(4,10)) // Script -console.log(string.substring(4)) // Script -let country = 'Finland' -console.log(country.substring(0, 3)) // Fin -console.log(country.substring(3, 7)) // land -console.log(country.substring(3)) // land \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/to_lowercase.js b/Portuguese/02_Day_Data_types/string_methods/to_lowercase.js deleted file mode 100644 index 1a4ab531..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/to_lowercase.js +++ /dev/null @@ -1,7 +0,0 @@ -// toLowerCase(): this method changes the string to lowercase letters. -let string = 'JavasCript' -console.log(string.toLowerCase()) // javascript -let firstName = 'Asabeneh' -console.log(firstName.toLowerCase()) // asabeneh -let country = 'Finland' -console.log(country.toLowerCase()) // finland \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/to_uppercase.js b/Portuguese/02_Day_Data_types/string_methods/to_uppercase.js deleted file mode 100644 index 112a6d07..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/to_uppercase.js +++ /dev/null @@ -1,8 +0,0 @@ -// toUpperCase(): this method changes the string to uppercase letters. - -let string = 'JavaScript' -console.log(string.toUpperCase()) // JAVASCRIPT -let firstName = 'Asabeneh' -console.log(firstName.toUpperCase()) // ASABENEH -let country = 'Finland' -console.log(country.toUpperCase()) // FINLAND \ No newline at end of file diff --git a/Portuguese/02_Day_Data_types/string_methods/trim.js b/Portuguese/02_Day_Data_types/string_methods/trim.js deleted file mode 100644 index 16785c43..00000000 --- a/Portuguese/02_Day_Data_types/string_methods/trim.js +++ /dev/null @@ -1,7 +0,0 @@ -//trim(): Removes trailing space in the beginning or the end of a string. -let string = ' 30 Days Of JavaScript ' -console.log(string) // -console.log(string.trim(' ')) // -let firstName = ' Asabeneh ' -console.log(firstName) -console.log(firstName.trim()) // \ No newline at end of file diff --git a/Portuguese/01_Day_introduction/01_day_starter/helloworld.js b/Portuguese/Dia_01_introdução/01_day_starter/helloworld.js similarity index 100% rename from Portuguese/01_Day_introduction/01_day_starter/helloworld.js rename to Portuguese/Dia_01_introdução/01_day_starter/helloworld.js diff --git a/Portuguese/01_Day_introduction/01_day_starter/index.html b/Portuguese/Dia_01_introdução/01_day_starter/index.html similarity index 100% rename from Portuguese/01_Day_introduction/01_day_starter/index.html rename to Portuguese/Dia_01_introdução/01_day_starter/index.html diff --git a/Portuguese/01_Day_introduction/01_day_starter/introduction.js b/Portuguese/Dia_01_introdução/01_day_starter/introduction.js similarity index 100% rename from Portuguese/01_Day_introduction/01_day_starter/introduction.js rename to Portuguese/Dia_01_introdução/01_day_starter/introduction.js diff --git a/Portuguese/01_Day_introduction/01_day_starter/main.js b/Portuguese/Dia_01_introdução/01_day_starter/main.js similarity index 100% rename from Portuguese/01_Day_introduction/01_day_starter/main.js rename to Portuguese/Dia_01_introdução/01_day_starter/main.js diff --git a/Portuguese/01_Day_introduction/01_day_starter/variable.js b/Portuguese/Dia_01_introdução/01_day_starter/variable.js similarity index 100% rename from Portuguese/01_Day_introduction/01_day_starter/variable.js rename to Portuguese/Dia_01_introdução/01_day_starter/variable.js diff --git a/Portuguese/01_Day_introduction/variable.js b/Portuguese/Dia_01_introdução/variable.js similarity index 100% rename from Portuguese/01_Day_introduction/variable.js rename to Portuguese/Dia_01_introdução/variable.js diff --git a/Portuguese/02_Day_Data_types/02_day_starter/index.html b/Portuguese/Dia_02_Tipos_Dados/dia_02_starter/index.html similarity index 100% rename from Portuguese/02_Day_Data_types/02_day_starter/index.html rename to Portuguese/Dia_02_Tipos_Dados/dia_02_starter/index.html diff --git a/Portuguese/02_Day_Data_types/02_day_starter/main.js b/Portuguese/Dia_02_Tipos_Dados/dia_02_starter/main.js similarity index 100% rename from Portuguese/02_Day_Data_types/02_day_starter/main.js rename to Portuguese/Dia_02_Tipos_Dados/dia_02_starter/main.js diff --git a/Portuguese/02_Day_Data_types/02_day_data_types.md b/Portuguese/Dia_02_Tipos_Dados/dia_02_tipos_dados.md similarity index 99% rename from Portuguese/02_Day_Data_types/02_day_data_types.md rename to Portuguese/Dia_02_Tipos_Dados/dia_02_tipos_dados.md index e9362a52..8392ead4 100644 --- a/Portuguese/02_Day_Data_types/02_day_data_types.md +++ b/Portuguese/Dia_02_Tipos_Dados/dia_02_tipos_dados.md @@ -14,7 +14,7 @@ -[<< Dia 1](../readMe.md) | [Dia 3 >>](../03_Day_Booleans_operators_date/03_booleans_operators_date.md) +[<< Dia 1](../readMe.md) | [Dia 3 >>](../Dia_03_Booleanos_Operadores_Data/dia_03_booleanos_operadores_data.md) ![Thirty Days Of JavaScript](/images/banners/day_1_2.png) diff --git a/Portuguese/Dia_03_Booleanos_Operadores_Data/03_day_starter/index.html b/Portuguese/Dia_03_Booleanos_Operadores_Data/03_day_starter/index.html new file mode 100644 index 00000000..2a8e6a80 --- /dev/null +++ b/Portuguese/Dia_03_Booleanos_Operadores_Data/03_day_starter/index.html @@ -0,0 +1,17 @@ + + + +
+