Message from JavaScript discussions

September 2018

— As long as they have a pure interface

— 

const map = (list, fn) => {
const result = [];
for (const item of list) {
result.push(fn(item));
}
return result;
};

— This is clearly imperative

— But the function itself is pure

— When called

— Since:
* There is no state between calls
* It will always return the same output for the same input

— I bet, it will eat a lot of "functional style" because it's simplier

— Https://www.npmtrends.com/angular-vs-react-vs-vue-vs-angular/core

— Guys, am i right when i say its obsolete to write an await in this situation:
await api.patch.then(res => res)

Message permanent page

— The then is the alternative to the await, isnt it?

— It's the opposite

— await api.patch.then(res => res)
const res = await api.patch