Appearances can be deceiving. On a technicality yes it's still async. However, from a callers perspective, it operates synchronously. The debate on if this is synchronous or non-synchronous was not the point of me posting this code. If you need a reminder, see the OP title.
For the caller the function returns on the setTimeout call
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.