I am new to JS and was learning promises. The code excerpt I want to show is this
promisedFunction.then(data=>console.log(data))
or simply
promisedFunction.then(console.log)
which is equivalent of the former code excerpt. The question is how is that possible to just use then(console.log)
instead of then(data=>console.log(data))
? Does it mean that we can omit the passed-from-promise data in thenable callback?