diff --git a/lab/lab1/part1-array-access.html b/lab/lab1/part1-array-access.html index 0ec964f..90535b6 100644 --- a/lab/lab1/part1-array-access.html +++ b/lab/lab1/part1-array-access.html @@ -57,8 +57,8 @@ ===================== */ var map = L.map('map', { - center: [39.9522, -75.1639], - zoom: 14 + center: [40.023341, -75.321082], + zoom: 12 }); var Stamen_TonerLite = L.tileLayer('http://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.{ext}', { @@ -75,9 +75,21 @@ ===================== */ + let restaurantData = [[40.002452, -75.274564, "Restaurant 1"], [40.023341, -75.321082, "Restaurant 2"], [40.083424, -75.405699, "Restaurant 3"]]; + + let addMarker = (obj) => {return L.marker([obj[0], obj[1]]).bindPopup(obj[2]).addTo(map)}; + + /*for(let i =0; i < restaurantData.length; i++) { + addMarker(restaurantData[i]).addTo(map); + }*/ + + restaurantData.forEach(addMarker); + + + /*restaurantData.forEach(addMarker().addTo(map)); L.marker([0, 0]).addTo(map); L.marker([0, 0]).addTo(map); - L.marker([0, 0]).addTo(map); + L.marker([0, 0]).addTo(map); */ /* ===================== diff --git a/lab/lab1/part2-fizzbuzz.html b/lab/lab1/part2-fizzbuzz.html index 5abb7be..4659f89 100644 --- a/lab/lab1/part2-fizzbuzz.html +++ b/lab/lab1/part2-fizzbuzz.html @@ -26,7 +26,12 @@ Start code ===================== */ - + for (let i = 1; i <= 100; i++) { + if(i%3===0 & i%5 ===0) {console.log('FizzBuzz');} + else if (i%3 === 0) {console.log('Fizz');} + else if (i%5 === 0) {console.log('Buzz');} + else {console.log(i)}; + } /* ===================== diff --git a/lab/lab1/part3-data-transformation.html b/lab/lab1/part3-data-transformation.html index c1328c8..78a40fd 100644 --- a/lab/lab1/part3-data-transformation.html +++ b/lab/lab1/part3-data-transformation.html @@ -1,5 +1,5 @@ - +
@@ -13,8 +13,8 @@ - - + +