Skip to content

Instantly share code, notes, and snippets.

@Xedii Xedii/start.js Secret
Last active Jan 25, 2019

Embed
What would you like to do?
(() => {
requestMock()
.then(res => res.data.arr)
.then(arr => {
if(arr.data.length) {
return requestMock()
.then(nextArr => {
return nextArr.map(nextEl => nextEl+5)
})
} else {
return arr.map(el => el+2)
}
}
})
.then(arr => console.log(arr));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.