JavaScript

How to Perform String Interpolation in JavaScript

Shou Arisaka
1 min read
Oct 13, 2025
var hoge="hoge"
undefined

//Use: ,
console.log('fuga', hoge)
VM113801:1 fuga hoge

//Use: +
console.log('fuga'+ hoge)
VM113801:1 fuga hoge

//Wrapping with backticks enables string interpolation.
console.log(`hoge ${hoge}`);
VM113628:1 hoge hoge

//%s can also be used
console.log('%s story',hoge);
VM113532:1 hoge story

Share this article

Shou Arisaka Oct 13, 2025

๐Ÿ”— Copy Links