pull/133/merge
Ashish Bhoya 7 months ago committed by GitHub
commit 2c6c4977ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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.

@ -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} <br>`;
}
}
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} <br> Last Name: ${lastName} <br> Age: ${age} <br> Address: ${address} <br> City: ${city} <br> State: ${state} <br> Zip: ${zip} <br> Country: ${country} <br> Phone: ${phone} <br> Email: ${email}`;
}

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src = "first.js"></script>
</head>
<body>
This is Ashish just doing some random stuff.
This is the array.
<div id = "Ok">
This is the current content.
</div>
<button onclick="tryingHere()">Press me</button>
<input type="text" id="input" placeholder="Enter the number here"> </input>
<button onclick = "table()" id = "table"> Click here to print the table of the Number Typed</button>
<div id = "tableHere"> Here the Table will get printed once the number is entered </div>
<div style="padding-top: 30px;" > Check if the company belongs FAANG</div>
<input type="text" id="company" placeholder="Enter the company name here"> </input>
<button onclick = "checkFAANG()" id = "check"> Click here to check if the company belongs to FAANG</button>
<div id = "result"> Here the result will get printed once the company is entered </div>
<div style="padding-top: 30px;" > Personal Info </div>
<input type="text" id="firstName" placeholder="Enter your first name here"> </input>
<input type="text" id="lastName" placeholder="Enter your last name here"> </input>
<input type="text" id="age" placeholder="Enter your age here"> </input>
<input type="text" id="email" placeholder="Enter your email here"> </input>
<input type="text" id="phone" placeholder="Enter your phone number here"> </input>
<input type="text" id="address" placeholder="Enter your address here"> </input>
<input type="text" id="city" placeholder="Enter your city here"> </input>
<input type="text" id="state" placeholder="Enter your state here"> </input>
<input type="text" id="zip" placeholder="Enter your zip code here"> </input>
<input type="text" id="country" placeholder="Enter your country here"> </input>
<button onclick = "personalInfo()" id = "personal"> Click here to print the personal info</button>
<div id = "personalInfo"> Here the personal info will get printed once the info is entered </div>
</body>
</html>

@ -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

@ -486,7 +486,7 @@ ReactDOM.render(<HexaColor />, 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?

Loading…
Cancel
Save