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}`
video: https://youtu.be/Mus_vwhTCq0?t=343
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}`
video: https://youtu.be/Mus_vwhTCq0?t=343