Async and Await are extensions of promises. An async function can contain an await expression that pauses the execution of the async function and waits for the passed Promise's resolution, and then resumes the async function's execution and returns the resolved value. Remember, the await keyword is only valid inside async functions.
Even if you have changed the value of x after calling the test function, still the value of x will remain 0 cause async function has already created it's new instance. Meaning everything changes on the variable outside of it will not change the value inside of it after it was called. Unless if you put your increment above the test function.