DEV Community

Discussion on: The Smallest Possible Mistake to make when using Promises

savagepixie profile image
SavagePixie • Edited on

Another thing you can do, when the then statement takes only one function with the return of the promise as its only parameter, is to just write its name, something like this:

dalmo profile image
Dalmo Mendonça Author

Yeah I usually do that as well, and in a sense that may have led me to believe then(console.log('smth')) would be okay. Subtle but makes all the difference.