If i have a promise that will be returned to a variable, and I check true|false on it before the promise is returned, will it always be false?
To clarify: the variable contains a unresolved promise.
Answer: "A pending promise is an object so it's "truthy" (if( promiseVar ) condition will always evaluate as true."
Aucun commentaire:
Enregistrer un commentaire