or console.log()
When debugging JavaScript I often find myself swapping arrow functions to old-school ones simply to log variables. But there’s no need! console.log
returns undefined
so one can simply OR a console.log call to get it to print out before the real return!
promise.then((response) => console.log(response) || response.data.test);