Skip to content

Commit 42614e6

Browse files
committed
merger
2 parents b340020 + 79489f8 commit 42614e6

File tree

19 files changed

+268
-1
lines changed

19 files changed

+268
-1
lines changed

arrays/exercises/part-one-arrays.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<<<<<<< HEAD
12
//Create an array that can hold 4 items name practiceFile.
23
let practiceFile = [
34
273.15
@@ -9,4 +10,11 @@ practiceFile.push('hello')
910
console.log(practiceFile);
1011
//Use a SetValue to add the items "false", and "-4.6" to the array. Print the array to confirm the changes.
1112
practiceFile.push(false, -4.6, '87');
12-
console.log(practiceFile)
13+
console.log(practiceFile)
14+
=======
15+
//Create an array called practiceFile with the following entry: 273.15
16+
17+
//Use the bracket notation method to add "42" and "hello" to the array. Add these new items one at a time. Print the array after each step to confirm the changes.
18+
19+
//Use a single .push() to add the following items: false, -4.6, and "87". Print the array to confirm the changes.
20+
>>>>>>> upstream/main
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Launch Status</title>
6+
<script>
7+
window.addEventListener("load", function() {
8+
fetch("https://handlers.education.launchcode.org/static/weather.json").then( function(response) {
9+
console.log(response);
10+
} );
11+
});
12+
</script>
13+
</head>
14+
<body>
15+
<h1>Launch Status</h1>
16+
Weather Conditions
17+
<div id="weather-conditions">
18+
<!-- TODO: dynamically add html about weather using data from API -->
19+
</div>
20+
</body>
21+
</html>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Launch Status</title>
6+
<script>
7+
window.addEventListener("load", function() {
8+
fetch("https://handlers.education.launchcode.org/static/weather.json").then( function(response) {
9+
// Access the JSON in the response
10+
response.json().then( function(json) {
11+
console.log(json);
12+
});
13+
});
14+
});
15+
</script>
16+
</head>
17+
<body>
18+
<h1>Launch Status</h1>
19+
Weather Conditions
20+
<div id="weather-conditions">
21+
<!-- TODO: dynamically add html about weather using data from API -->
22+
</div>
23+
</body>
24+
</html>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Launch Status</title>
6+
<script>
7+
window.addEventListener("load", function() {
8+
fetch("https://handlers.education.launchcode.org/static/weather.json").then( function(response) {
9+
// Access the JSON in the response
10+
response.json().then( function(json) {
11+
const div = document.getElementById('weather-conditions');
12+
div.innerHTML = `
13+
<ul>
14+
<li>Temp ${json.temp}</li>
15+
<li>Wind Speed ${json.windSpeed}</li>
16+
<li>Status ${json.status}</li>
17+
<li>Chance of Precip ${json.chanceOfPrecipitation}</li>
18+
</ul>
19+
`;
20+
});
21+
});
22+
});
23+
</script>
24+
</head>
25+
<body>
26+
<h1>Launch Status</h1>
27+
Weather Conditions
28+
<div id="weather-conditions">
29+
<!-- TODO: dynamically add html about weather using data from API -->
30+
</div>
31+
</body>
32+
</html>

fetch/studio/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width">
6+
<title>Astronauts</title>
7+
<link href="style.css" rel="stylesheet" type="text/css" />
8+
</head>
9+
<body>
10+
<script src="script.js"></script>
11+
<h1>Astronauts</h1>
12+
<div id="container">
13+
<!-- List of astronauts will be added here dynamically -->
14+
</div>
15+
</body>
16+
</html>

fetch/studio/script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//TODO: Add Your Code Below

fetch/studio/style.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.avatar {
2+
border-radius: 50%;
3+
height: 100px;
4+
float:right;
5+
}
6+
7+
.astronaut {
8+
border: 1px solid black;
9+
display: flex;
10+
justify-content: space-between;
11+
width: 500px;
12+
align-items: center;
13+
padding: 5px;
14+
margin-bottom: 20px;
15+
border-radius: 6px;
16+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width">
6+
<title>repl.it</title>
7+
<link href="style.css" rel="stylesheet" type="text/css" />
8+
</head>
9+
<body>
10+
<form action="https://handlers.education.launchcode.org/request-parrot" method="post">
11+
12+
<!-- single checkbox -->
13+
<label>crew<input type="checkbox" name="crewReady"/></label>
14+
15+
<!-- group with different name -->
16+
<h3>Activities</h3>
17+
<label>cooking<input type="checkbox" name="cooking"/></label>
18+
<label>running<input type="checkbox" name="running"/></label>
19+
<label>movies<input type="checkbox" name="movies"/></label>
20+
21+
<!-- group all with same name -->
22+
<h3>Ingredients</h3>
23+
<label>Onion<input type="checkbox" name="ingredient" value="onion"/></label>
24+
<label>Butter<input type="checkbox" name="ingredient" value="butter"/></label>
25+
<label>Rice<input type="checkbox" name="ingredient" value="rice"/></label>
26+
27+
<button>Send Report</button>
28+
</form>
29+
</body>
30+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Add Your Code Below
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*/ Add Your Code Below /*/
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Form POST</title>
6+
<style>
7+
label {
8+
display: block;
9+
padding-bottom: 10px;
10+
}
11+
body {
12+
padding: 25px;
13+
}
14+
</style>
15+
</head>
16+
<body>
17+
<!-- Because method and action are set, a POST request will be sent to the action addess, with a message containing the field values.-->
18+
<form action="https://handlers.education.launchcode.org/request-parrot" method="POST">
19+
<label>Username <input type="text" name="username"></label>
20+
<label>Team Name <input type="text" name="teamName">
21+
</label>
22+
<button>Submit</button>
23+
</form>
24+
</body>
25+
</html>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Form Example</title>
6+
<style>
7+
label {
8+
display: block;
9+
padding-bottom: 10px;
10+
}
11+
body {
12+
padding: 25px;
13+
}
14+
</style>
15+
</head>
16+
<body>
17+
<!-- Form will use default action value and submit form to current page. -->
18+
<form action="">
19+
<label>Username <input type="text" name="username"></label>
20+
<label>Team Name <input type="text" name="team">
21+
</label>
22+
<button>Submit</button>
23+
</form>
24+
</body>
25+
</html>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Form Validation</title>
6+
<style>
7+
label {display: block;}
8+
body {padding: 25px;}
9+
</style>
10+
</head>
11+
<script>
12+
window.addEventListener("load", function() {
13+
let form = document.querySelector("form");
14+
form.addEventListener("submit", function(event) {
15+
alert("submit clicked");
16+
});
17+
});
18+
</script>
19+
<body>
20+
<form method="POST" action="https://handlers.education.launchcode.org/request-parrot">
21+
<label>Username <input type="text" name="username"></label>
22+
<label>Team Name <input type="text" name="team"></label>
23+
<button>Submit</button>
24+
</form>
25+
</body>
26+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//Add Your Code Below
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*/ Add your Code Below /*/
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Rocket Simulation</title>
6+
<style>
7+
label { display: block; margin-bottom: 7px;}
8+
</style>
9+
</head>
10+
<body>
11+
<!-- TODO: add form here -->
12+
13+
14+
<p>WARNING: This ONLY works in <b>replit</b> if this "result" page is opened in its own window. Click the icon that shows a box with an arrow coming out of it.
15+
</p>
16+
</body>
17+
18+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//Code Your Solution Below
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*/ Code Your Solution Below /*/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!doctype html>
2+
3+
<head>
4+
<meta charset="utf-8">
5+
<script>
6+
// TODO: create a handler
7+
window.addEventListener("load", function(){
8+
// TODO: register the handler
9+
});
10+
</script>
11+
</head>
12+
13+
<body>
14+
15+
<form id="searchForm">
16+
<!-- TODO: add form elements -->
17+
</form>
18+
19+
</body>

0 commit comments

Comments
 (0)