Skip to content Skip to sidebar Skip to footer
Showing posts with the label Template Literals

Are Javascript Template Literals Guaranteed To Call Tostring()?

const num = 42 const str = `My number is ${num}` In this code what guarantee do I have about the c… Read more Are Javascript Template Literals Guaranteed To Call Tostring()?

How Would You Turn A Javascript Variable Into A Template Literal?

I would like to take text that I generated and stored in a string and use it like a template litera… Read more How Would You Turn A Javascript Variable Into A Template Literal?

Defining A Function Inside A Template Literal

I'm using styled-components as a solution to styling for React. They've got a nice approach… Read more Defining A Function Inside A Template Literal

Javascript Es6 Tagged Templates - When Is Raw Used? When Is Cooked Used?

After studying this Es6 tag template example: var yo = func`${x} + ${y}\n= ${x + y}`; one@public-… Read more Javascript Es6 Tagged Templates - When Is Raw Used? When Is Cooked Used?