User:Sneha.22.7/common.js

mw.loader.using('mediawiki.api', function{ //http://en.wikipedia.org/w/api.php?action=query&prop=langlinks&format=json&lllimit=50&titles=India

var api = new mw.Api; api.get({ action: 'query', prop: 'langlinks', format: 'json',

lllimit: '50',

titles: 'India'} ).done( function(data){ // Function definition *only*

alert("hello"); console.log( '2' ); alert(data);

}); });