Three short assignments this week as we continue to learn/review JavaScript. Additionally, we have to think about what out first mashup will be.
Looping a Triangle
var hash = "#";
for (var i = 0; i < 6; i++) {
console.log(hash);
hash += "#";
}
FizzBuzz
for (var i = 1; i < 101; 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);
}
}
Chess Board
var string = "";
for (var i = 0; i < 8; i++) {
for (var j = 0; j < 8; j++) {
if (((i + j) % 2 == 0)) {
string += "#";
}
else {
string += " ";
}
}
string += "\n";
}
console.log(string);
Mashup Ideas
For our first assignment we have to create a single web page experience that, upon user input, responds with data from at least 2 web APIs.
Foursquare Heatmap
One idea I have is to create some sort of Foursquare Heatmap. I like maps, and I like Foursquare. I could use the Foursquare API to retrieve data on venues that are trending, or have high ratings, and then map their locations using the Google Maps API. I feel like this has probably been done before (and Foursquare's website somewhat functions like this) so I want to think what other value I can provide, whether it's functional, entertaining, etc.
I Want to Go to...
A mashup that, once again, involves maps. Users would type in a city or country they want to visit, and it would pull up Instagram pictures that are geotagged.
What Should I Eat?
A Foursquare + Foodspotting mashup. Maps restaurants in a given location, and populates the page with photos of suggested dishes to eat.