I am new to JS. I just went to MDN website https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then to play around the example given. I changed the example to
var promise1 = new Promise(function(resolve, reject) {
resolve('Success!');
});
promise1
.then(value => console.log(value))
.then(console.log('1'))
.then(console.log('2'))
.then(console.log('3'))
.then(console.log('4'))
.then(console.log('5'));
I expect the result to be Success! then 1 and all the way to 5. However, the result is 1 to 5 and then Success! It seems a little weird to me. I have already chained it well but not 'branching' it. Thanks a lot