if a javascript function wants to return multiple values code example
Example: return multiple values in javascript
function getNames() {
// get names from the database or API
let firstName = 'John',
lastName = 'Doe';
// return values
return {
firstName,
lastName
};
}