impactbyte-drogon-scholarship / discussion

General Discussion
https://glints.id
The Unlicense
2 stars 0 forks source link

Return multiple values #2

Open mhaidarhanif opened 6 years ago

mhaidarhanif commented 6 years ago
const combineFullName = (first, last) => {
    const full = `${first} ${last}`

    return {
        first: first,
        last: last,
        full: full
    }
}

const result = combineFullName("Haidar", "Hanif")

console.log(result);
console.log(result.first);
console.log(result.last);
console.log(result.full);