<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pro-Tek Blog &#187; Literals in HTML5</title>
	<atom:link href="http://www.pro-tekconsulting.com/blog/tag/literals-in-html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pro-tekconsulting.com/blog</link>
	<description>For UI developers / UI designers and UI trends</description>
	<lastBuildDate>Thu, 05 Sep 2019 03:59:47 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.34</generator>
	<item>
		<title>WHAT ARE TEMPLATE LITERALS IN HTML5?</title>
		<link>http://www.pro-tekconsulting.com/blog/what-are-template-literals-in-html5/</link>
		<comments>http://www.pro-tekconsulting.com/blog/what-are-template-literals-in-html5/#comments</comments>
		<pubDate>Fri, 30 Nov 2018 07:54:43 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Literals in HTML5]]></category>

		<guid isPermaLink="false">http://www.pro-tekconsulting.com/blog/?p=2739</guid>
		<description><![CDATA[<p>What are template literals in HTML5? Template literals are enclosed by the back-tick (` `) Template literals can contain placeholders. These are indicated by the dollar sign and curly braces (${expression}). The expressions in the placeholders and the text between them get passed to a function. In order to embed expressions within normal strings, you [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog/what-are-template-literals-in-html5/">WHAT ARE TEMPLATE LITERALS IN HTML5?</a> appeared first on <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog">Pro-Tek Blog</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h4>What are template literals in HTML5?</h4>
<p>Template literals are enclosed by the back-tick (` `)</p>
<p>Template literals can contain placeholders. These are indicated by the dollar sign and curly braces (${expression}). The expressions in the placeholders and the text between them get passed to a function.</p>
<p>In order to embed expressions within normal strings, you can use the following syntax:</p>
<p>var a = 5;<br />
var b = 10;<br />
console.log(&#8216;Fifteen is &#8216; + (a + b) + &#8216; and\nnot &#8216; + (2 * a + b) + &#8216;.&#8217;);<br />
// &#8220;Fifteen is 15 and<br />
// not 20.&#8221;</p>
<p>Now, with template literals, you are able to make use of the syntactic sugar making substitutions like this more readable:</p>
<p>var a = 5;<br />
var b = 10;<br />
console.log(`Fifteen is ${a + b} and<br />
not ${2 * a + b}.`);<br />
// &#8220;Fifteen is 15 and<br />
// not 20.&#8221;</p>
<p>Nesting Templates:</p>
<p>In certain times, nesting a template is the easiest and perhaps more readable way to have configurable strings. Within a backticked template it is simple to allow inner backticks simply by using them inside a placeholder ${ } within the template. For instance, if condition a is true: then return this templated literal.</p>
<p>The post <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog/what-are-template-literals-in-html5/">WHAT ARE TEMPLATE LITERALS IN HTML5?</a> appeared first on <a rel="nofollow" href="http://www.pro-tekconsulting.com/blog">Pro-Tek Blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pro-tekconsulting.com/blog/what-are-template-literals-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
