function getEvents(userid,year,week) {
var items = [];
var path = "js/test.json";
$.getJSON( path).done(function( data ) {
items = data.sessions;
});
return items;
}
var list = getEvents(10,1991,13);
Here is my javascriot and I need to get an array to return from getEvents()
method.