function(result) {
return new Promise((resolve)=>setTimeout(()=>resolve(result), 1000));
}
this.method = function () {
let result = Promise.resolve(data);
for (let func of this.arr) {
result = result.then(func);
}
};
this.method = function () {
return this.arr.reduce((acc, fn) => acc.then(fn), Promise.resolve());
}