JS
challenger
Home
JavaScript Basics
strings
Display a User’s Age with Template Literals
Display a User’s Age with Template Literals
Given the variables name and age, use a template literal to create a sentence in the format: [name] is [age] years old. Assign this string to the variable sentence.
Premium
reset
function greet(name) { return `Hello, ${name}!`; } console.log(greet("Erik"));
JavaScript
Run Code
Console