Hello I am trying to capture the const user UID and console log it but for some reason, it cannot be pulled and is saying that the const is not defined
Here is my JS
function userIdShown() {
firebase.auth().onAuthStateChanged(function userIdentification(user) {
if(user){
const userID = user.uid;
return userID
}
});
}
userIdShown();
console.log(userID);