My requirement is to firstly open the db database and then execute the second method. I tried I haven't done something like that in JS so any advice/guidance is greatly appreciated.
My code can be found here. How can I make this asynchronous? I have the option of setTimeout which I don't find a good practise...
Any examples will be extremely helpful.