дублирует функционал beforeRouteUpdate
if (object.prop1) {}
const oldArray = [
{
firstName: 'Дима',
lastName: 'Турков'
}
]
const newArray = oldArray.map(item => {
return {
newFirstName: item.firstName,
newLastName: item.lastName
}
})
// результат [{ newFirstName: 'Дима', newLastName: 'Турков' }]
if (!service) {
service = 'driving'
}