I wanted to try out a sample demo of implementing Gmaps v3 and tried out this example from Google\'s documentation, but there is no output , the page just loads for a few se
First of all: Google Maps 3 does not need an api key anymore, so you are fine with
https://maps.googleapis.com/maps/api/js?sensor=false
as an URL.
(As Jeff Hoye pointed out, as of June 22, 2016, an API Key is required again.)
And then you forgot the "new" in this line:
var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
With those changes your map will be displayed.