Populate Contacts Phone and Email from Account fields, Custom function

Populate Contacts Phone and Email from Account fields, Custom function

Hello,

I am pretty new with Custom functions and would like to populate the fields "Phone" and "Email" of a contact, upon its creation, with the "Phone" and "Email" fields in the Account to which the contacts belong.

Account.Phone and Account.Email  ------- on Contact creation ----> Contact.Phone and Contact.Email

I believe this can be done using Custom functions. Is there any example I could follow?

Thanks in advance.