JS: How to make my code wait until this function has returned? – React native
I have the following code in my React Native app for checking if permission is granted for a camera on Android: function hasAndroidPermission() { checkPermission('camera') .then(res => { if (res === RESULTS.DENIED) { requestPermission('camera') .then(res => { if (res ===…