Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
let horse = {age : 10}

function horseAge(str, age){

    const ageStr = age > 5 ? 'old' : 'young';
    return `${str[0]} ${ageStr} at ${age} years`;

horseAge`This hourse is ${horse.age}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment