Skip to main content
DevTyp.i.ng
Back

Share

How to interpolate with Javascriptjavascript

00:00:00

Press Esc to exit this exercise.

const name = 'John';
const age = 30;

// Using template literals for interpolation

const message = `Hello, my name is ${name} and I am ${age} years old.`;

console.log(message);