Hey All, can you help in finding out the reason ofor line #19

Hey All, can you help in finding out the reason ofor line #19
Hi @nxa786
Looks like subject parameter value might be null.
Extend your code using an IF condition. See below.
if (subject) {
let subjectText = subject.replace("Re: ", "");
console.log(`Updated subject: ${subjectText}`);
} else {
console.log("subject is undefined or null");
}