diff --git a/01_Day_JavaScript_Refresher/01_javascript_refresher.md b/01_Day_JavaScript_Refresher/01_javascript_refresher.md index 7d03fb4..4d113b8 100644 --- a/01_Day_JavaScript_Refresher/01_javascript_refresher.md +++ b/01_Day_JavaScript_Refresher/01_javascript_refresher.md @@ -957,15 +957,15 @@ const webTechs = [ ] ``` -1. Declare an _empty_ array; -2. Declare an array with more than 5 number of elements -3. Find the length of your array -4. Get the first item, the middle item and the last item of the array -5. 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 -6. Declare an array variable name itCompanies and assign initial values Facebook, Google, Microsoft, Apple, IBM, Oracle and Amazon -7. Print the array using _console.log()_ -8. Print the number of companies in the array -9. Print the first company, middle and last company +1. Declare an _empty_ array; .... Done +2. Declare an array with more than 5 number of elements ... Done +3. Find the length of your array ... Done +4. Get the first item, the middle item and the last item of the array ... Done +5. 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 ... Done +6. Declare an array variable name itCompanies and assign initial values Facebook, Google, Microsoft, Apple, IBM, Oracle and Amazon .... Done +7. Print the array using _console.log()_ .... Done +8. Print the number of companies in the array ... Done +9. Print the first company, middle and last company ... Done 10. Print out each company 11. Change each company name to uppercase one by one and print them out 12. Print the array like as a sentence: Facebook, Google, Microsoft, Apple, IBM,Oracle and Amazon are big IT companies. diff --git a/01_Day_JavaScript_Refresher/first.js b/01_Day_JavaScript_Refresher/first.js new file mode 100644 index 0000000..44f8868 --- /dev/null +++ b/01_Day_JavaScript_Refresher/first.js @@ -0,0 +1,55 @@ +let arr = []; +console.log(arr); +let secondArr = [5, 4, 3, 2, 1]; +secondArr.sort(); +console.log(secondArr); + +let check = 1; + +function tryingHere() { + const trying = "This is Ashish Bhoya"; + const MikeRoss = "This is legendary Mike Ross"; + if (check === 1) + document.getElementById("Ok").innerHTML = trying, check = 0; + else + document.getElementById("Ok").innerHTML = MikeRoss, check = 1; +} + +function table() { + let num = document.getElementById("input").value; + document.getElementById("tableHere").innerHTML = ""; + for (let i = 1; i <= 10; i++) { + document.getElementById("tableHere").innerHTML += `${num} * ${i} = ${num * i}
`; + } +} + +const MANGA = ["Meta", "Apple", "Netflix", "Google", "Amazon"]; + +function checkFAANG() { + let input = document.getElementById("company").value; + let check = false; + for (let i = 0; i < MANGA.length; i++) { + if (input.toUpperCase() === MANGA[i].toUpperCase()) { + check = true; + break; + } + } + if (check) { + document.getElementById("result").innerHTML = "Yes this is in FAANG"; + } + else document.getElementById("result").innerHTML = "No this is not in FAANG"; +} + +function personalInfo() { + let firstName = document.getElementById("firstName").value; + let lastName = document.getElementById("lastName").value; + let age = document.getElementById("age").value; + let address = document.getElementById("address").value; + let city = document.getElementById("city").value; + let state = document.getElementById("state").value; + let zip = document.getElementById("zip").value; + let country = document.getElementById("country").value; + let phone = document.getElementById("phone").value; + let email = document.getElementById("email").value; + document.getElementById("personalInfo").innerHTML = `First Name: ${firstName}
Last Name: ${lastName}
Age: ${age}
Address: ${address}
City: ${city}
State: ${state}
Zip: ${zip}
Country: ${country}
Phone: ${phone}
Email: ${email}`; +} diff --git a/01_Day_JavaScript_Refresher/index.html b/01_Day_JavaScript_Refresher/index.html new file mode 100644 index 0000000..d06f502 --- /dev/null +++ b/01_Day_JavaScript_Refresher/index.html @@ -0,0 +1,39 @@ + + + + + + + Document + + + + This is Ashish just doing some random stuff. + This is the array. +
+ This is the current content. +
+ + + +
Here the Table will get printed once the number is entered
+
Check if the company belongs FAANG
+ + +
Here the result will get printed once the company is entered
+ +
Personal Info
+ + + + + + + + + + + +
Here the personal info will get printed once the info is entered
+ + \ No newline at end of file diff --git a/02_Day_Introduction_to_React/02_introduction_to_react.md b/02_Day_Introduction_to_React/02_introduction_to_react.md index f94fdb2..11826e4 100644 --- a/02_Day_Introduction_to_React/02_introduction_to_react.md +++ b/02_Day_Introduction_to_React/02_introduction_to_react.md @@ -1565,9 +1565,9 @@ Now, you have a very good understanding of how to create JSX elements and also h #### Exercises: Why React? -1. Why did you chose to use react? -2. What measures do you use to know popularity ? -3. What is more popular, React or Vue ? +1. Why did you chose to use react? ... Beacause my Manager said so else I'll get fired +2. What measures do you use to know popularity ?.. By viewing the stars on one's framework libraby on github as per this page +3. What is more popular, React or Vue ? ... It's the one and only React #### Exercises: JSX diff --git a/04_Day_Components/04_components.md b/04_Day_Components/04_components.md index 0f9c268..6aca9f0 100644 --- a/04_Day_Components/04_components.md +++ b/04_Day_Components/04_components.md @@ -486,7 +486,7 @@ ReactDOM.render(, rootElement) ## Exercises: Level 1 -1. What is the difference between a regular function and an arrow function? +1. What is the difference between a regular function and an arrow function? ... Didnt Got time today .. Will do this on weekend 2. What is a React Component? 3. How do you make a React functional component? 4. What is the difference between a pure JavaScript function and a functional component?