i'm a newbie in javascript and angular, so i'm learning these. could anybody interpret below code snippet for me?
public loadDataForPage(page: number, pageSize: number, callback?: (any) => void) {
this._http.get(this._buildDataUrl(page, pageSize))
.subscribe((data: any) => {
const startIndex = (page-1) * pageSize;
this._updateData(data, startIndex);
this._data.next(data);
callback({data});
});
}
i don't know this part callback?: (any) => void and callback({data});
thanks.