Javascript – How is the promise settled by the time it is logged?
I have the following code: async function get_exam_score() { const exam_score = Math.random() * 10; if (exam_score < 5) { throw("You failed"); } } const promise = get_exam_score(); console.log("TRY:", promise); and if I run that above code, console.log() shows that…