4 ms·
I agree. Using a synchronous programming style (i.e. function returns value) whenever you are performing a synchronous operation is always going to be more cle
by santoriv 12y ago
I agree.
Using a synchronous programming style (i.e. function returns value) whenever you are performing a synchronous operation is always going to be more clear than using an asynchronous programming style for synchronous operations (i.e. function invokes passed function with value and returns undefined). And that's why many languages have await - to help make the async code have a more synchronous(and more easily readable) programming style.