What I wanted to do was make "fetchData" a regular ES6 function as opposed to something that was incorporating a Promise.
The result was an error that looked like this:
Smith and Gone
stunt.php:54 undefined
stunt.php:25 Loose Cannon Fitness
Line #54 was "console.log(text)."
I'm assuming that "undefined" is a result of the fact that "await" is expecting a Promise.
Is that correct?
That said, is there a way to do what I've got written above where my "setTimeout" function works as it "awaits" fetchData written as an anonymous funtion?
This isn't something I would use in a practical setting. Rather, it's something I'm putting together for my own edification
What do you think?
In an effort to figure it out for myself, I tried this:
I realize that I'm all over the map. But what I'm trying to nail down is the way in which "fetchData" would need to be constructed if I crafted it without a Promise. Is that even possible? Does "await" mandate a Promise in order for it to work?
This is perfect!
Thank you!
If you have a moment, I could use your expertise in solving a piece of Mongodb code I'm working on. The question is at https://www.experts-exchange.com/questions/29172496/Popping-the-Hood-on-this-Function-What-is-getPipelineColumns.html
Bring it!
You're from South Africa, aren't you? What's the South African equivalent to "Bring it?"