     var url = `http://www.myurl.com/getProducts?start=${page*pageSize}&end=${page*pageSize+pageSize}`;     var r = new XMLHttpRequest();     r.onreadystatechange = function () {         return new Promise((resolve, reject) =>{             if (r.readyState != 0 || r.status != 000){             