Skip to main content

Posts

Showing posts from September, 2012

ES6 101 - Map

ES6 101 - Map
ES6 Map is the topic of today’s post which also is the 11th in the ES6 101 Series. Map is going to be fairly easy, so before jumping into it, if you want to look at other features we have covered so far, here is a quick list for your reference.Fat Arrow FunctionsLexical Declarations - LetLexical Declarations - ConstSpread OPeratorTemplate LiteralRest OperatorDefault parametersDestructuringFor…ofSetNow let’s see what Map has to offer. As opposed to Set (which by the way, I highly recommend reading), Map saves values as key-value pair. Let’s see for ourselves how this works!Example of ES6 Mapvar dummyMap = newMap(); dummyMap.set("1"); // Method is set as against add in ES6 Setconsole.log(dummyMap); // [["1",null]] dummyMap.set("1", "one"); console.log(dummyMap); // [["1","one"]] dummyMap.set("2", "two").set("3","three"); console.log(dummyMap); // [["1","one&…

Panoramio Hangout Game

Google has launched a new web based game powered by the Panoramio and Google+ Hangouts platform. The concept of the game is to guess where a photo was taken on Google Maps. You compete with your friends to make the best guess. The game is played in rounds. In every round, one player is the round master and the other players are the guessers. The round master chooses a photo. Then the other players take guesses at where the photo was taken from. When the time is up, the player who made the best guess wins, and becomes the round master for the next round.


    In more detail…
The round master sees a map. He or she can drag and zoom the map, or enter a place name in the search box. Meanwhile, the guessers need to wait.Next to the map, the round master sees a selection of photos from the area shown in the map.The round master chooses a photo by clicking on it.If the round master is satisfied with the photo, he can click on "start…