Hey there, I could really use some assistance with optimizing this code snippet. Does anyone have any ideas on how to improve it? Here's the code:
optimizeCode(value, fieldName: string) {
if (fieldName === 'fullName') {
this.billingFields.full_name = value;
}
if (fieldName === 'address') {
this.billingFields.address = value;
}
if (fieldName === 'postalCode') {
this.billingFields.postal_code = value;
}
if (fieldName === 'city') {
this.billingFields.city = value;
}
if (fieldName === 'stateOrProvince') {
this.billingFields.state_or_province = value;
}
if (fieldName === 'taxId') {
this.billingFields.tax_id = value;
}
}