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

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?

How To Call Native Es6 Template String Replacement From Tag Function?

I'm writing a es6 tag function for template literals, which first checks a condition in the str… Read more How To Call Native Es6 Template String Replacement From Tag Function?

How Can I Call A Template Literal Tag Function On A Regular String?

If I have a template literal tag function foo, which let's me do: const fooTaggedText = foo`som… Read more How Can I Call A Template Literal Tag Function On A Regular String?

Why Can't String.raw End With A Backslash?

String.raw can be used to create a string that contains backslashes, without having to double up th… Read more Why Can't String.raw End With A Backslash?