VS Code: Automatically convert concatenated strings to use template strings

Last updated: April 17, 2020
Automatically convert concatenated strings to use template strings

You can convert concatenated strings to use template strings from the Refactor context menu, or clicking the lightbulb icon when it appears. This can convert your code from this:

const string = 'This is a ' + cake.type + ' cake.'

Into this:

const string = `This is a ${cake.type} cake.`

I also shared this on twitter!

Sign up to receive a developer tip, in the form of a gif, in your inbox each week