How to write a function using JavaScript syntax to calculate a person's gross pay for a week. The function should receive the number of hours worked and the rate of pay per hour. The function should return the gross pay. The function should calculate any hours worked beyond 40 as overtime and pay one and a half times the regular pay rate.