0

The following logs "undefined" to the console while I'm intending it to log "return this":

function main() {
  promise()
    .then(function() { return "return this"});
}

console.log(main())

I think its returning the value "return this" to the main function, but then its not returning from the main function to be logged to the console. How could I change my code to make this work?

Cœur
  • 37,241
  • 25
  • 195
  • 267
tom894
  • 459
  • 1
  • 3
  • 14

0 Answers0