Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Commit

Permalink
added exercise files
Browse files Browse the repository at this point in the history
  • Loading branch information
svodnik committed Jun 19, 2021
1 parent 4b4e089 commit 956b288
Show file tree
Hide file tree
Showing 101 changed files with 2,319 additions and 0 deletions.
Empty file added Ch01/01_04/begin/extremes.json
Empty file.
Empty file.
Empty file.
Empty file added Ch01/01_04/end/extremes.json
Empty file.
5 changes: 5 additions & 0 deletions Ch01/01_04/end/highestFeatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"point": "Mount Everest",
"volcano": "Ojos del Salado",
"glacier": "Khumbu Glacier"
}
5 changes: 5 additions & 0 deletions Ch01/01_04/end/highestPeaks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
"Mount Everest",
"K2",
"Kangchenjunga"
]
Empty file added Ch01/01_05/begin/extremes.json
Empty file.
5 changes: 5 additions & 0 deletions Ch01/01_05/begin/highestFeatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"point": "Mount Everest",
"volcano": "Ojos del Salado",
"glacier": "Khumbu Glacier"
}
5 changes: 5 additions & 0 deletions Ch01/01_05/begin/highestPeaks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
"Mount Everest",
"K2",
"Kangchenjunga"
]
160 changes: 160 additions & 0 deletions Ch01/01_05/begin/schedule.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
{
"?xml": {
"@version": "1.0",
"@encoding": "utf-8"
},
"root": {
"@id": "1",
"uri": {
"#cdata-section": "http://api.bart.gov/api/etd.aspx?cmd=etd&orig=12th&json=y"
},
"date": "03/27/2021",
"time": "01:12:01 PM PDT",
"station": [
{
"name": "12th St. Oakland City Center",
"abbr": "12TH",
"etd": [
{
"destination": "Antioch",
"abbreviation": "ANTC",
"limited": "0",
"estimate": [
{
"minutes": "20",
"platform": "3",
"direction": "North",
"length": "10",
"color": "YELLOW",
"hexcolor": "#ffff33",
"bikeflag": "1",
"delay": "0"
}, {
"minutes": "49",
"platform": "3",
"direction": "North",
"length": "10",
"color": "YELLOW",
"hexcolor": "#ffff33",
"bikeflag": "1",
"delay": "0"
}, {
"minutes": "79",
"platform": "3",
"direction": "North",
"length": "10",
"color": "YELLOW",
"hexcolor": "#ffff33",
"bikeflag": "1",
"delay": "0"
}
]
}, {
"destination": "Berryessa",
"abbreviation": "BERY",
"limited": "0",
"estimate": [
{
"minutes": "8",
"platform": "2",
"direction": "South",
"length": "8",
"color": "ORANGE",
"hexcolor": "#ff9933",
"bikeflag": "1",
"delay": "0"
}, {
"minutes": "38",
"platform": "2",
"direction": "South",
"length": "8",
"color": "ORANGE",
"hexcolor": "#ff9933",
"bikeflag": "1",
"delay": "0"
}, {
"minutes": "68",
"platform": "2",
"direction": "South",
"length": "8",
"color": "ORANGE",
"hexcolor": "#ff9933",
"bikeflag": "1",
"delay": "0"
}
]
}, {
"destination": "Richmond",
"abbreviation": "RICH",
"limited": "0",
"estimate": [
{
"minutes": "19",
"platform": "1",
"direction": "North",
"length": "8",
"color": "ORANGE",
"hexcolor": "#ff9933",
"bikeflag": "1",
"delay": "0"
}, {
"minutes": "49",
"platform": "1",
"direction": "North",
"length": "8",
"color": "ORANGE",
"hexcolor": "#ff9933",
"bikeflag": "1",
"delay": "0"
}, {
"minutes": "79",
"platform": "1",
"direction": "North",
"length": "8",
"color": "ORANGE",
"hexcolor": "#ff9933",
"bikeflag": "1",
"delay": "0"
}
]
}, {
"destination": "SF Airport",
"abbreviation": "SFIA",
"limited": "0",
"estimate": [
{
"minutes": "5",
"platform": "2",
"direction": "South",
"length": "10",
"color": "YELLOW",
"hexcolor": "#ffff33",
"bikeflag": "1",
"delay": "0"
}, {
"minutes": "35",
"platform": "2",
"direction": "South",
"length": "10",
"color": "YELLOW",
"hexcolor": "#ffff33",
"bikeflag": "1",
"delay": "0"
}, {
"minutes": "65",
"platform": "2",
"direction": "South",
"length": "10",
"color": "YELLOW",
"hexcolor": "#ffff33",
"bikeflag": "1",
"delay": "0"
}
]
}
]
}
],
"message": ""
}
}
12 changes: 12 additions & 0 deletions Ch01/01_05/end/extremes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Highest Peaks": [
"Mount Everest",
"K2",
"Kangchenjunga"
],
"Lowest Points": [
"Dead Sea",
"Lake Assal",
"Turpan Pendi"
]
}
5 changes: 5 additions & 0 deletions Ch01/01_05/end/highestFeatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"point": "Mount Everest",
"volcano": "Ojos del Salado",
"glacier": "Khumbu Glacier"
}
5 changes: 5 additions & 0 deletions Ch01/01_05/end/highestPeaks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
"Mount Everest",
"K2",
"Kangchenjunga"
]
8 changes: 8 additions & 0 deletions Ch01/01_06/begin/stock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
'item': "DuroSport 5",
"manufacturer": 'Prism',
"wholesalePrice": 84.,
"listPrice": 099.95,
"inStock": true,
// add listPriceHistory array
}
8 changes: 8 additions & 0 deletions Ch01/01_07/begin/stock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
'item': "DuroSport 5",
"manufacturer": 'Prism',
"wholesalePrice": 84.,
"listPrice": 099.95,
"inStock": true,
// add listPriceHistory array
}
12 changes: 12 additions & 0 deletions Ch01/01_07/end/stock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"item": "DuroSport 5",
"manufacturer": "Prism",
"wholesalePrice": 84.00,
"listPrice": 99.95,
"inStock": true,
"listPriceHistory": [
94.95,
85.00,
124.95
]
}
9 changes: 9 additions & 0 deletions Ch02/02_02/begin/items.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const products = '[{"id":"530","name":"Bamboo Thermal Ski Coat","image_title":"ski-coat_lynda_29940","image":"https://hplussport.com/wp-content/uploads/2016/12/ski-coat_LYNDA_29940.jpg"},{"id":"436","name":"Blueberry Mineral Water","image_title":"mineral-water-blueberry_600px","image":"https://hplussport.com/wp-content/uploads/2015/12/mineral-water-blueberry_600px.png"}]';

// Add code to parse the products variable here:


const item = '{"id":"530","name":"Bamboo Thermal Ski Coat","image_title":"ski-coat_lynda_29940","image":"https://hplussport.com/wp-content/uploads/2016/12/ski-coat_LYNDA_29940.jpg"}';

// Add code to parse the item variable here:

7 changes: 7 additions & 0 deletions Ch02/02_02/end/items.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const products = '[{"id":"530","name":"Bamboo Thermal Ski Coat","image_title":"ski-coat_lynda_29940","image":"https://hplussport.com/wp-content/uploads/2016/12/ski-coat_LYNDA_29940.jpg"},{"id":"436","name":"Blueberry Mineral Water","image_title":"mineral-water-blueberry_600px","image":"https://hplussport.com/wp-content/uploads/2015/12/mineral-water-blueberry_600px.png"}]';

let productsParsed = JSON.parse(products);

const item = '{"id":"530","name":"Bamboo Thermal Ski Coat","image_title":"ski-coat_lynda_29940","image":"https://hplussport.com/wp-content/uploads/2016/12/ski-coat_LYNDA_29940.jpg"}';

let itemParsed = JSON.parse(item);
39 changes: 39 additions & 0 deletions Ch02/02_03/begin/cart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
let cart = [
{
productId: "530",
itemKey: "34354b059d38a963ba3a1bed499f593d",
itemName: "Bamboo Thermal Ski Coat",
variations: {
sizeWomens: "medium",
color: "periwinkle",
price: 99.00,
}
},
{
productId: "532",
itemKey: "a14cab08bca65354fd65dc6482a55ff5",
itemName: "Slicker Jacket",
variations: {
sizeMens: "large",
color: "lemon",
price: 125.00,
}
}
];

// Enter code to stringify the `cart` variable here:


let single = {
productId: "530",
itemKey: "34354b059d38a963ba3a1bed499f593d",
itemName: "Bamboo Thermal Ski Coat",
variations: {
sizeWomens: "medium",
color: "periwinkle",
price: 99.00,
}
};

// Enter code to stringify the `single` variable here:

37 changes: 37 additions & 0 deletions Ch02/02_03/end/cart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
let cart = [
{
productId: "530",
itemKey: "34354b059d38a963ba3a1bed499f593d",
itemName: "Bamboo Thermal Ski Coat",
variations: {
sizeWomens: "medium",
color: "periwinkle",
price: 99.00,
}
},
{
productId: "532",
itemKey: "a14cab08bca65354fd65dc6482a55ff5",
itemName: "Slicker Jacket",
variations: {
sizeMens: "large",
color: "lemon",
price: 125.00,
}
}
];

const cartJson = JSON.stringify(cart);

let single = {
productId: "530",
itemKey: "34354b059d38a963ba3a1bed499f593d",
itemName: "Bamboo Thermal Ski Coat",
variations: {
sizeWomens: "medium",
color: "periwinkle",
price: 99.00,
}
};

const singleJson = JSON.stringify(single);
27 changes: 27 additions & 0 deletions Ch02/02_04/begin/blog.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Ch02/02_04/begin/issue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const queue = '[{"id":"394","title":"Eat your veggies"},{"id":"378","title":"Every step counts"},{"id":"406","title":"Giving Back"}]';

// Enter code to destringify the `queue` variable here:


const item = '{"id":"406","title":"Giving Back"}';

// Enter code to destringify the `item` variable here:

Loading

0 comments on commit 956b288

Please sign in to comment.