I would like to get a deeper understanding of how Promises work internally. Therefore I have some sample code:
var p1
Normally code is synchronous - one statement executes like (fileopen) and there is a guarantee that the next statement will execute immediately afterwards like filewrite()
but in asynchronous operations like nodejs, you should assume that