I have the following code

```js
function a() {
  b().then((success) => {
    if (success) {
      console.log('B')
    }
  })
}

function b() {
  return new Promise((resolve, reject) => {
    resolve(true)
    console.log('A')
  })
}
a();
```

How to log `B` before `A` without using `setTimeout(()=>{console.log('A')}, 0)`