I've been working on understanding how to manage the execution order of my script using asynchronous functions and promises. Despite going through numerous resources, I'm still struggling with getting it to work as expected:
My approach involves having a Vue.js object that contains methods, and triggering a series of async functions when the app is mounted:
var testAPP = new Vue({
el: '#test-app',
data: {
},
// Methods code here...
})
The anticipated output sequence should be like this:
User story goes here.
Expected console log output.
More user stories...
However, the actual result doesn't match the expected order, showing immediate logs instead of the delays between steps.
Despite trying different methods, including adjusting promise returns and function dependencies, the issue persists.
Why are my functions not honoring the specified order within the async process?
Any insights or suggestions would be greatly appreciated!
Here's the simple HTML setup used for testing in Edge:
<!DOCTYPE html>
<script src="https://unpkg.com/vue/dist/vue.min.js"></script>
<script type="text/javascript" src="path/to/your/script.js"></script>