About what the return value for then function for javscript promise

hello, I am reading the lesson in this link:


i am confunsed about this code and wonder what will happen to first “then” if the first promise function generate a promise that is rejected:

.then((firstResolveVal) => {
  return secondPromiseFunction(firstResolveVal);
.then((secondResolveVal) => {

my educated guess is that it will return the old promise with intial relosved value which is the same as what firstpromisefunction return