You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.6 KiB
60 lines
1.6 KiB
<!doctype html> |
|
<html> |
|
<head> |
|
<meta charset="utf-8"> |
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
<title>My Learning Website</title> |
|
<link href="/styles/styles.css" rel="stylesheet" type="text/css"> |
|
<link href="/webdevelopment/styles/styles.css" rel="stylesheet" type="text/css"> |
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> |
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> |
|
<!--[if lt IE 9]> |
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> |
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
|
<![endif]--> |
|
</head> |
|
|
|
<body id="homebody"> |
|
<div class="header"> |
|
<h1>The data.js file from Challenge: Build an Advanced Function</h1> |
|
</div> |
|
<pre class="codesample"> |
|
// Import the Backpack class so we can make new Backpack objects. |
|
import Backpack from "./Backpack.js"; |
|
|
|
// Create new Backpack object |
|
const everydayPack = new Backpack( |
|
"pack01", |
|
"Everyday Backpack", |
|
30, |
|
"grey", |
|
15, |
|
26, |
|
26, |
|
false, |
|
"December 5, 2018 15:00:00 PST", |
|
"../assets/images/everyday.svg" |
|
); |
|
|
|
// Create new Backpack object |
|
const frogPack = new Backpack( |
|
"pack02", |
|
"Frog Backpack", |
|
8, |
|
"green", |
|
3, |
|
10, |
|
10, |
|
false, |
|
"October 16, 2019 15:00:00 PST", |
|
"../assets/images/frog.svg" |
|
); |
|
|
|
// Add Backpack objects into an array |
|
const backpackObjectArray = [everydayPack, frogPack]; |
|
|
|
// Export the array to be used in other files |
|
export default backpackObjectArray;</pre> |
|
</body> |
|
</html>
|
|
|