Delete Project 1.txt
This commit is contained in:
Vendored
-38
@@ -1,38 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head><title>Project 14</title></head>
|
|
||||||
<body>
|
|
||||||
<script src="myscript.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
// myscript.js
|
|
||||||
let url = "people.json";
|
|
||||||
fetch(url)
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
console.log(data);
|
|
||||||
data.forEach(person => {
|
|
||||||
console.log(`${person.first} ${person.last} - ${person.topic}`);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// people.json
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"first": "Laurence",
|
|
||||||
"last": "Svekis",
|
|
||||||
"topic": "JavaScript"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"first": "John",
|
|
||||||
"last": "Smith",
|
|
||||||
"topic": "HTML"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"first": "Jane",
|
|
||||||
"last": "Doe",
|
|
||||||
"topic": "CSS"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
Reference in New Issue
Block a user