@
Mateusz W
1- The first log 'success' comes from the 'console.log(result)' that you have written.
2 -The second log 'Promise {: undefined}' is refering to the 'promise1.then(result => console.log(result))
', because the 'then' function return itselelf a promise that resolves
the result that you return inside it (in your case you return nothing inside then).
To be sure verify the following code :
promise1.then(result => console.log(result)).then(result1 => {})
you will obtain the following result
succes
undefined
Promise {<fulfilled>: undefined}
The undefined after the success is the one that you find in your 'Promise {: undefined}'
that correspond here to result1.
Do not confuse with this Promise {<fulfilled>: undefined}
that you see here (result of my code) because this is referring to the second then that I chained to your then
In summary: you may were confused and thought that the Promise {<fulfilled>: undefined}
that you saw in console is referring to you promise1 const.
No it is not, it is the return of the then function.