I am struggling to understand how to get the value of a promise within Javascript to be able to check whether it is true or false.
let valid = validateForm();
if ( valid === true ) {
}
If I console.log the valid variable, it returns the following:
Promise {<pending>}
__proto__: Promise
[[PromiseStatus]]: "resolved"
[[PromiseValue]]: true
Within my if statement, I am trying to check whether the promise value is true, however I don't know how to gain access to this :/ Could anyone please advise how to check this?
Thanks