Board Thread:JS Development/@comment-9605025-20191030060753/@comment-27958705-20191030070123

you can use promise (vanilla) or  deferred (jquery).

simplified (ripped out from real script) code to get all pages