In fact, moment itself supports the function you mentioned. You only need to put the variable you want to copy into moment and generate another one. The two will not affect each other.
const a = moment();
console.log('a', a); // 4月24日
const b = moment(a).add(1, 'days'); //moment一下,完成对a的复制
console.log('a', a);// 4月24日
console.log('b', b);// 4月25日
In fact, moment itself supports the function you mentioned. You only need to put the variable you want to copy into moment and generate another one. The two will not affect each other.