Rewriting Javascript: Using Template Strings

Chris Burgin
3 min readApr 14, 2017

--

TLDR; See Banner Image;

The Scenario

Sometimes you need to get data from an object and convert that data into a user friendly string. Its a simple problem, with a simple solution, but maybe we can improve it slightly.

Lets say we have the following JSON object. Its a simple user and want to create a string that advertises that users twitter account.

--

--

Chris Burgin

Christ follower. Dog caretaker. Developer at Generation Tux.