node.js – After function is finished;wait till action

I have a function that outputs some data from a endpoint

var test = async function()
{
    const result = await getData();
    getUserInputContinue();
}

After that, I will continue with more code after the user pressed any key. I want to do that with inquirer.

async function getUserInputContinue() {
    console.log("WAIT USER INPUT");
    const questions = [
        {
            type: 'input',
            name: 'CONTINUE',
            message: chalk.green('Press Enter to continue')
        }
    ];
    return inquirer.prompt(questions);
}

But I tried a lot of things, but I can’t hold the code until there is a respons from getData().
How can I archive that?

Read more here: Source link