Using .catch in promises

Hey! recently I came up with a codecademy problem in which we learn that we can use .catch( ) instead of using a failure handler as a second argument for .then( ).

e.g. instead of using this:

prom
  .then((resolvedValue) => {
    console.log(resolvedValue);
  })
  .then(null, (rejectionReason) => {
    console.log(rejectionReason);
  });

we would use this:

prom
  .then((resolvedValue) => {
    console.log(resolvedValue);
  })
  .catch((rejectionReason) => {
    console.log(rejectionReason);
  });

My question is, when or why is it better to use .catch( ) instead of the normal .then(handler1, handler2) syntax? I tried both of them in Codecademy’s example and I couldn’t find a difference between the two.

Any feedback is appreciated.