April 2018
Intermediate to advanced
284 pages
5h 46m
English
| Tip 4 | Convert Variables to Readable Strings with Template Literals |
In this tip, you will learn how to convert variables into new strings without concatenation.
Strings are messy. That’s all there is to it. When you’re pulling information from strings, you have to deal with the ugliness of natural language: capitalization, punctuation, misspellings. It’s a headache.
Collecting information into strings is less painful, but it can still get ugly quickly. Combining strings in JavaScript can be particularly rough, especially when you combine strings assigned to variables with strings surrounded by quotes.
Here’s a situation that comes up all the time: You need to build a URL. In this case, you’re building a link to an image on a cloud service. Your ...
Read now
Unlock full access