I think it's ok. Async/Await is an amazing ES6 feature, keep going with that. You might forget about the callback hell.
And one more thing. Await can be used with the sync functions. It just does nothing if you make a mistake. E.g.
constasyncMethod=()=>{returnnewPromise(resolve=>{setTimeout(()=>resolve('Hello'),1000);});}constsyncMethod=()=>{return'World';}functionasyncgreeting=()=>{consthello=awaitasyncMethod();// below await is not needed, but it works tooconstworld=awaitsyncMethod();console.log(hello,world);// logs Hello World}
Of course, you don't have to put await anywhere, but if you don't know if the function is async or sync just put it and you will be right.
Good luck!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think it's ok. Async/Await is an amazing ES6 feature, keep going with that. You might forget about the callback hell.
And one more thing. Await can be used with the sync functions. It just does nothing if you make a mistake. E.g.
Of course, you don't have to put await anywhere, but if you don't know if the function is async or sync just put it and you will be right.
Good luck!