@r0ktech ADCB
As Promises are registered in microtask queue and settimeout callbacks are registered in callback queue and event loop prioritizes microtask queue.
That's why c will be logged 1st.
@r0ktech 5
Reference error.
A is defined inside function, so we can only access a inside the function.
As b is not attached with any keyword, it has become global variable.