parent
b77099807a
commit
3aac652f9a
@ -0,0 +1,195 @@
|
||||
const countries = [
|
||||
'Afghanistan',
|
||||
'Albania',
|
||||
'Algeria',
|
||||
'Andorra',
|
||||
'Angola',
|
||||
'Antigua and Barbuda',
|
||||
'Argentina',
|
||||
'Armenia',
|
||||
'Australia',
|
||||
'Austria',
|
||||
'Azerbaijan',
|
||||
'Bahamas',
|
||||
'Bahrain',
|
||||
'Bangladesh',
|
||||
'Barbados',
|
||||
'Belarus',
|
||||
'Belgium',
|
||||
'Belize',
|
||||
'Benin',
|
||||
'Bhutan',
|
||||
'Bolivia',
|
||||
'Bosnia and Herzegovina',
|
||||
'Botswana',
|
||||
'Brazil',
|
||||
'Brunei',
|
||||
'Bulgaria',
|
||||
'Burkina Faso',
|
||||
'Burundi',
|
||||
'Cambodia',
|
||||
'Cameroon',
|
||||
'Canada',
|
||||
'Cape Verde',
|
||||
'Central African Republic',
|
||||
'Chad',
|
||||
'Chile',
|
||||
'China',
|
||||
'Colombi',
|
||||
'Comoros',
|
||||
'Congo (Brazzaville)',
|
||||
'Congo',
|
||||
'Costa Rica',
|
||||
"Cote d'Ivoire",
|
||||
'Croatia',
|
||||
'Cuba',
|
||||
'Cyprus',
|
||||
'Czech Republic',
|
||||
'Denmark',
|
||||
'Djibouti',
|
||||
'Dominica',
|
||||
'Dominican Republic',
|
||||
'East Timor (Timor Timur)',
|
||||
'Ecuador',
|
||||
'Egypt',
|
||||
'El Salvador',
|
||||
'Equatorial Guinea',
|
||||
'Eritrea',
|
||||
'Estonia',
|
||||
'Ethiopia',
|
||||
'Fiji',
|
||||
'Finland',
|
||||
'France',
|
||||
'Gabon',
|
||||
'Gambia, The',
|
||||
'Georgia',
|
||||
'Germany',
|
||||
'Ghana',
|
||||
'Greece',
|
||||
'Grenada',
|
||||
'Guatemala',
|
||||
'Guinea',
|
||||
'Guinea-Bissau',
|
||||
'Guyana',
|
||||
'Haiti',
|
||||
'Honduras',
|
||||
'Hungary',
|
||||
'Iceland',
|
||||
'India',
|
||||
'Indonesia',
|
||||
'Iran',
|
||||
'Iraq',
|
||||
'Ireland',
|
||||
'Israel',
|
||||
'Italy',
|
||||
'Jamaica',
|
||||
'Japan',
|
||||
'Jordan',
|
||||
'Kazakhstan',
|
||||
'Kenya',
|
||||
'Kiribati',
|
||||
'Korea, North',
|
||||
'Korea, South',
|
||||
'Kuwait',
|
||||
'Kyrgyzstan',
|
||||
'Laos',
|
||||
'Latvia',
|
||||
'Lebanon',
|
||||
'Lesotho',
|
||||
'Liberia',
|
||||
'Libya',
|
||||
'Liechtenstein',
|
||||
'Lithuania',
|
||||
'Luxembourg',
|
||||
'Macedonia',
|
||||
'Madagascar',
|
||||
'Malawi',
|
||||
'Malaysia',
|
||||
'Maldives',
|
||||
'Mali',
|
||||
'Malta',
|
||||
'Marshall Islands',
|
||||
'Mauritania',
|
||||
'Mauritius',
|
||||
'Mexico',
|
||||
'Micronesia',
|
||||
'Moldova',
|
||||
'Monaco',
|
||||
'Mongolia',
|
||||
'Morocco',
|
||||
'Mozambique',
|
||||
'Myanmar',
|
||||
'Namibia',
|
||||
'Nauru',
|
||||
'Nepal',
|
||||
'Netherlands',
|
||||
'New Zealand',
|
||||
'Nicaragua',
|
||||
'Niger',
|
||||
'Nigeria',
|
||||
'Norway',
|
||||
'Oman',
|
||||
'Pakistan',
|
||||
'Palau',
|
||||
'Panama',
|
||||
'Papua New Guinea',
|
||||
'Paraguay',
|
||||
'Peru',
|
||||
'Philippines',
|
||||
'Poland',
|
||||
'Portugal',
|
||||
'Qatar',
|
||||
'Romania',
|
||||
'Russia',
|
||||
'Rwanda',
|
||||
'Saint Kitts and Nevis',
|
||||
'Saint Lucia',
|
||||
'Saint Vincent',
|
||||
'Samoa',
|
||||
'San Marino',
|
||||
'Sao Tome and Principe',
|
||||
'Saudi Arabia',
|
||||
'Senegal',
|
||||
'Serbia and Montenegro',
|
||||
'Seychelles',
|
||||
'Sierra Leone',
|
||||
'Singapore',
|
||||
'Slovakia',
|
||||
'Slovenia',
|
||||
'Solomon Islands',
|
||||
'Somalia',
|
||||
'South Africa',
|
||||
'Spain',
|
||||
'Sri Lanka',
|
||||
'Sudan',
|
||||
'Suriname',
|
||||
'Swaziland',
|
||||
'Sweden',
|
||||
'Switzerland',
|
||||
'Syria',
|
||||
'Taiwan',
|
||||
'Tajikistan',
|
||||
'Tanzania',
|
||||
'Thailand',
|
||||
'Togo',
|
||||
'Tonga',
|
||||
'Trinidad and Tobago',
|
||||
'Tunisia',
|
||||
'Turkey',
|
||||
'Turkmenistan',
|
||||
'Tuvalu',
|
||||
'Uganda',
|
||||
'Ukraine',
|
||||
'United Arab Emirates',
|
||||
'United Kingdom',
|
||||
'United States',
|
||||
'Uruguay',
|
||||
'Uzbekistan',
|
||||
'Vanuatu',
|
||||
'Vatican City',
|
||||
'Venezuela',
|
||||
'Vietnam',
|
||||
'Yemen',
|
||||
'Zambia',
|
||||
'Zimbabwe'
|
||||
]
|
@ -0,0 +1,195 @@
|
||||
const countries = [
|
||||
'Afghanistan',
|
||||
'Albania',
|
||||
'Algeria',
|
||||
'Andorra',
|
||||
'Angola',
|
||||
'Antigua and Barbuda',
|
||||
'Argentina',
|
||||
'Armenia',
|
||||
'Australia',
|
||||
'Austria',
|
||||
'Azerbaijan',
|
||||
'Bahamas',
|
||||
'Bahrain',
|
||||
'Bangladesh',
|
||||
'Barbados',
|
||||
'Belarus',
|
||||
'Belgium',
|
||||
'Belize',
|
||||
'Benin',
|
||||
'Bhutan',
|
||||
'Bolivia',
|
||||
'Bosnia and Herzegovina',
|
||||
'Botswana',
|
||||
'Brazil',
|
||||
'Brunei',
|
||||
'Bulgaria',
|
||||
'Burkina Faso',
|
||||
'Burundi',
|
||||
'Cambodia',
|
||||
'Cameroon',
|
||||
'Canada',
|
||||
'Cape Verde',
|
||||
'Central African Republic',
|
||||
'Chad',
|
||||
'Chile',
|
||||
'China',
|
||||
'Colombi',
|
||||
'Comoros',
|
||||
'Congo (Brazzaville)',
|
||||
'Congo',
|
||||
'Costa Rica',
|
||||
"Cote d'Ivoire",
|
||||
'Croatia',
|
||||
'Cuba',
|
||||
'Cyprus',
|
||||
'Czech Republic',
|
||||
'Denmark',
|
||||
'Djibouti',
|
||||
'Dominica',
|
||||
'Dominican Republic',
|
||||
'East Timor (Timor Timur)',
|
||||
'Ecuador',
|
||||
'Egypt',
|
||||
'El Salvador',
|
||||
'Equatorial Guinea',
|
||||
'Eritrea',
|
||||
'Estonia',
|
||||
'Ethiopia',
|
||||
'Fiji',
|
||||
'Finland',
|
||||
'France',
|
||||
'Gabon',
|
||||
'Gambia, The',
|
||||
'Georgia',
|
||||
'Germany',
|
||||
'Ghana',
|
||||
'Greece',
|
||||
'Grenada',
|
||||
'Guatemala',
|
||||
'Guinea',
|
||||
'Guinea-Bissau',
|
||||
'Guyana',
|
||||
'Haiti',
|
||||
'Honduras',
|
||||
'Hungary',
|
||||
'Iceland',
|
||||
'India',
|
||||
'Indonesia',
|
||||
'Iran',
|
||||
'Iraq',
|
||||
'Ireland',
|
||||
'Israel',
|
||||
'Italy',
|
||||
'Jamaica',
|
||||
'Japan',
|
||||
'Jordan',
|
||||
'Kazakhstan',
|
||||
'Kenya',
|
||||
'Kiribati',
|
||||
'Korea, North',
|
||||
'Korea, South',
|
||||
'Kuwait',
|
||||
'Kyrgyzstan',
|
||||
'Laos',
|
||||
'Latvia',
|
||||
'Lebanon',
|
||||
'Lesotho',
|
||||
'Liberia',
|
||||
'Libya',
|
||||
'Liechtenstein',
|
||||
'Lithuania',
|
||||
'Luxembourg',
|
||||
'Macedonia',
|
||||
'Madagascar',
|
||||
'Malawi',
|
||||
'Malaysia',
|
||||
'Maldives',
|
||||
'Mali',
|
||||
'Malta',
|
||||
'Marshall Islands',
|
||||
'Mauritania',
|
||||
'Mauritius',
|
||||
'Mexico',
|
||||
'Micronesia',
|
||||
'Moldova',
|
||||
'Monaco',
|
||||
'Mongolia',
|
||||
'Morocco',
|
||||
'Mozambique',
|
||||
'Myanmar',
|
||||
'Namibia',
|
||||
'Nauru',
|
||||
'Nepal',
|
||||
'Netherlands',
|
||||
'New Zealand',
|
||||
'Nicaragua',
|
||||
'Niger',
|
||||
'Nigeria',
|
||||
'Norway',
|
||||
'Oman',
|
||||
'Pakistan',
|
||||
'Palau',
|
||||
'Panama',
|
||||
'Papua New Guinea',
|
||||
'Paraguay',
|
||||
'Peru',
|
||||
'Philippines',
|
||||
'Poland',
|
||||
'Portugal',
|
||||
'Qatar',
|
||||
'Romania',
|
||||
'Russia',
|
||||
'Rwanda',
|
||||
'Saint Kitts and Nevis',
|
||||
'Saint Lucia',
|
||||
'Saint Vincent',
|
||||
'Samoa',
|
||||
'San Marino',
|
||||
'Sao Tome and Principe',
|
||||
'Saudi Arabia',
|
||||
'Senegal',
|
||||
'Serbia and Montenegro',
|
||||
'Seychelles',
|
||||
'Sierra Leone',
|
||||
'Singapore',
|
||||
'Slovakia',
|
||||
'Slovenia',
|
||||
'Solomon Islands',
|
||||
'Somalia',
|
||||
'South Africa',
|
||||
'Spain',
|
||||
'Sri Lanka',
|
||||
'Sudan',
|
||||
'Suriname',
|
||||
'Swaziland',
|
||||
'Sweden',
|
||||
'Switzerland',
|
||||
'Syria',
|
||||
'Taiwan',
|
||||
'Tajikistan',
|
||||
'Tanzania',
|
||||
'Thailand',
|
||||
'Togo',
|
||||
'Tonga',
|
||||
'Trinidad and Tobago',
|
||||
'Tunisia',
|
||||
'Turkey',
|
||||
'Turkmenistan',
|
||||
'Tuvalu',
|
||||
'Uganda',
|
||||
'Ukraine',
|
||||
'United Arab Emirates',
|
||||
'United Kingdom',
|
||||
'United States',
|
||||
'Uruguay',
|
||||
'Uzbekistan',
|
||||
'Vanuatu',
|
||||
'Vatican City',
|
||||
'Venezuela',
|
||||
'Vietnam',
|
||||
'Yemen',
|
||||
'Zambia',
|
||||
'Zimbabwe'
|
||||
]
|
@ -0,0 +1 @@
|
||||
console.log('Hello, World!')
|
@ -0,0 +1 @@
|
||||
console.log('Hello, World!')
|
@ -0,0 +1,14 @@
|
||||
// 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
|
@ -0,0 +1,14 @@
|
||||
// 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
|
@ -0,0 +1 @@
|
||||
console.log('30 Günlük JS dərsləri')
|
@ -0,0 +1 @@
|
||||
console.log('30 Günlük JS dərsləri')
|
@ -0,0 +1,34 @@
|
||||
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))
|
@ -0,0 +1,34 @@
|
||||
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))
|
@ -0,0 +1,19 @@
|
||||
// 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)
|
@ -0,0 +1,19 @@
|
||||
// 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)
|
@ -0,0 +1,5 @@
|
||||
//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
|
@ -0,0 +1,5 @@
|
||||
//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
|
@ -0,0 +1,7 @@
|
||||
//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()) //
|
Loading…
Reference in new issue