const to string question - javascript

How do I take this phone const, and print the value out where it should be where I have highlighted?

I need to put the value of const phone into string form right before \rPhone:

Thanks a lot

Just do as you do with the fields but only use ${phone} and it should work just great

Thanks, that seemed to help, but now look at the phone number output in the email. It is supposed to be formatted like this: (000) 999-8888

How do I pass the result from the formatPhoneNumber function into the sendFormData function?
What I did as a work around is I tried to put that function inside of the other one.

I GOT IT TO WORK

HERE IS THE CODE TO SEND AN EMAIL, (along with some back end files) IF ANYONE ELSE WANTS TO DO THIS.

THANKS FOR HELP BROTHER

Hi, Eric.

The question ended up not being “How do I pass the result from the formatPhoneNumber function into the sendFormData function?”; instead, you ended up calling the formatPhoneNumber() function from within the sendFormData() function.

Cleaner code and no duplication; well done!

Art