const petName = 'Leo' const placeholder = '{NAME}' const reminderTemplate = '{NAME} is due for another visit. Please call us so we can set up a new appointment. We look forward to seeing you and {NAME} soon.' const reminder = reminderTemplate.replace(placeholder, petName)
String.prototype.replace only replaces the first occurrence found in the string. If there could be more than one occurrence, use String.prototype.replaceAll.
const petName = 'Leo' const placeholder = '{NAME}' const reminderTemplate = '{NAME} is due for another visit. Please call us so we can set up a new appointment. We look forward to seeing you and {NAME} soon.' const reminder = reminderTemplate.replaceAll(placeholder, petName)