<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Coding Mug</title><description></description><managingEditor>noreply@blogger.com (Ayesha)</managingEditor><pubDate>Sun, 22 Sep 2024 01:24:26 -0700</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">2</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://codingmug.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title/><link>http://codingmug.blogspot.com/2018/04/javascript-in-detail-introduction-i-am.html</link><author>noreply@blogger.com (Ayesha)</author><pubDate>Wed, 4 Apr 2018 03:28:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1135847635526711555.post-572519842508273297</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6nkP6y3G-bTBiNWVwwF0Orpc91vr21NdvM02Gsue1kdTQmCKbgcZ-UZMRLubq5V6JjA_yzNS4cVdjwaMzjEPJQR5vEIx-avLtQvulvYvRH1ktu65mJO2ty7o7GENCyjrsSHBflg0G7AE/s1600/js.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="JS" border="0" data-original-height="219" data-original-width="569" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6nkP6y3G-bTBiNWVwwF0Orpc91vr21NdvM02Gsue1kdTQmCKbgcZ-UZMRLubq5V6JjA_yzNS4cVdjwaMzjEPJQR5vEIx-avLtQvulvYvRH1ktu65mJO2ty7o7GENCyjrsSHBflg0G7AE/s640/js.png" title="JavaScript" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style="text-align: left;"&gt;
JavaScript In detail&lt;/h2&gt;
&lt;div&gt;
&lt;h2 style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Hiragino Kaku Gothic Pro&amp;quot;, Meiryo, &amp;quot;Hiragino Sans GB W3&amp;quot;, &amp;quot;Noto Naskh Arabic&amp;quot;, &amp;quot;Droid Arabic Naskh&amp;quot;, &amp;quot;Geeza Pro&amp;quot;, &amp;quot;Simplified Arabic&amp;quot;, &amp;quot;Noto Sans Thai&amp;quot;, Thonburi, Dokchampa, &amp;quot;Droid Sans Thai&amp;quot;, &amp;quot;Droid Sans Fallback&amp;quot;, -apple-system, &amp;quot;.SFNSDisplay-Regular&amp;quot;, &amp;quot;Heiti SC&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Segoe UI&amp;quot;; line-height: 40px; margin: 2.8rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Introduction&lt;/h2&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
I am trying to write a article series which start from begineer level and slowly slowly move towards professional level,I will try to cover each and every phase of JavaScript programming with possible errors when we code JavaScript and how debug that code also try to cover how JavaScript use with ASP.Net and MVC framework&lt;/div&gt;
&lt;h2 style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Hiragino Kaku Gothic Pro&amp;quot;, Meiryo, &amp;quot;Hiragino Sans GB W3&amp;quot;, &amp;quot;Noto Naskh Arabic&amp;quot;, &amp;quot;Droid Arabic Naskh&amp;quot;, &amp;quot;Geeza Pro&amp;quot;, &amp;quot;Simplified Arabic&amp;quot;, &amp;quot;Noto Sans Thai&amp;quot;, Thonburi, Dokchampa, &amp;quot;Droid Sans Thai&amp;quot;, &amp;quot;Droid Sans Fallback&amp;quot;, -apple-system, &amp;quot;.SFNSDisplay-Regular&amp;quot;, &amp;quot;Heiti SC&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Segoe UI&amp;quot;; line-height: 40px; margin: 2.8rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Background&lt;/h2&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Now a days JavaScript become more and more famous language due to it's recent frameworks like Angular,Backbone,React etc. JavaScript frameworks are famous among developers for their efficiency and cost (opensource).&amp;nbsp;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Angular is one of the favorite JavaScript framework for developing single page application(SPA) and it is powered by google.Many developers adapt Angular for their application as well as Angular is highly preferred for hybrid application.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
But before start work on framework ,you have to take a look on JavaScript,I also tell you one thing that JavaScript itself a very useful language and at the end of my tutorial you assume that JavaScript much useful for you in your projects&amp;nbsp;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
I start my tutorial from beginner and we travel different "Vila of JavaScript",I try to make tutorial with scenario my all tutorial series around a project in which we cover all areas of JavaScript language in depth&amp;nbsp;&lt;/div&gt;
&lt;h2 style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Hiragino Kaku Gothic Pro&amp;quot;, Meiryo, &amp;quot;Hiragino Sans GB W3&amp;quot;, &amp;quot;Noto Naskh Arabic&amp;quot;, &amp;quot;Droid Arabic Naskh&amp;quot;, &amp;quot;Geeza Pro&amp;quot;, &amp;quot;Simplified Arabic&amp;quot;, &amp;quot;Noto Sans Thai&amp;quot;, Thonburi, Dokchampa, &amp;quot;Droid Sans Thai&amp;quot;, &amp;quot;Droid Sans Fallback&amp;quot;, -apple-system, &amp;quot;.SFNSDisplay-Regular&amp;quot;, &amp;quot;Heiti SC&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Segoe UI&amp;quot;; line-height: 40px; margin: 2.8rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-size: 19.5px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Introduction to JavaScript&lt;/span&gt;&amp;nbsp;&lt;/h2&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
JavaScript is a programming language which require engine for interpreting program and runing it,so we can say that JavaScript compile on runtime.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Most Common JavaScript Engines are :&lt;/span&gt;&lt;/div&gt;
&lt;ul style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 13px; line-height: 3.2rem; margin: 3.2rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/Rhino_(JavaScript_engine)" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Rhino&lt;/a&gt;, managed by the Mozilla Foundation, open source, developed entirely in Java&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/SpiderMonkey_(JavaScript_engine)" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;SpiderMonkey&lt;/a&gt;, the first JavaScript engine, which powered&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Netscape_Navigator" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Netscape Navigator&lt;/a&gt;&amp;nbsp;and today powers&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Firefox" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Firefox&lt;/a&gt;&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/V8_(JavaScript_engine)" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;V8&lt;/a&gt;&amp;nbsp;- open source, developed by Google in Denmark, part of Google Chrome&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/JavaScriptCore" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;JavaScriptCore&lt;/a&gt;&amp;nbsp;- open source, marketed as Nitro and developed by&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Apple_Inc." rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Apple&lt;/a&gt;&amp;nbsp;for&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Safari_(web_browser)" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Safari&lt;/a&gt;&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/KJS_(KDE)" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;KJS&lt;/a&gt;&amp;nbsp;- KDE's ECMAScript/JavaScript engine originally developed by&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Harri_Porten" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Harri Porten&lt;/a&gt;&amp;nbsp;for the KDE project's Konqueror web browser&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/Chakra_(JScript_engine)" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Chakra (JScript9)&lt;/a&gt;, for&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Internet_Explorer" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Internet Explorer&lt;/a&gt;&lt;a href="https://en.wikipedia.org/wiki/JavaScript_engine#cite_note-17" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;[17]&lt;/a&gt;&lt;a href="https://en.wikipedia.org/wiki/JavaScript_engine#cite_note-18" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;[18]&lt;/a&gt;&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/Chakra_(JavaScript_engine)" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Chakra (JavaScript)&lt;/a&gt;&amp;nbsp;for&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Microsoft_Edge" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Microsoft Edge&lt;/a&gt;&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/Nashorn_(JavaScript_engine)" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Nashorn&lt;/a&gt;, open source as part of OpenJDK, written by Oracle Java Languages and Tool Group&lt;a href="https://en.wikipedia.org/wiki/JavaScript_engine#cite_note-19" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;[19]&lt;/a&gt;&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/Juce" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Juce&lt;/a&gt;, a&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/C%2B%2B" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;C++&lt;/a&gt;&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Application_framework" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;application framework&lt;/a&gt;, contains a custom embedded interpreter using part of JavaScript's syntax.&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/JerryScript" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;JerryScript&lt;/a&gt;, is an ultra-lightweight JavaScript engine for the Internet of Things.&lt;/li&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://en.wikipedia.org/wiki/Jsish" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Jsish&lt;/a&gt;, a JavaScript engine with type-checking modelled after&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/Tcl" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Tcl&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;a href="https://en.wikipedia.org/wiki/JavaScript_engine" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;(Source Wikipedia)&lt;/a&gt;&lt;/div&gt;
&lt;h2 style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Hiragino Kaku Gothic Pro&amp;quot;, Meiryo, &amp;quot;Hiragino Sans GB W3&amp;quot;, &amp;quot;Noto Naskh Arabic&amp;quot;, &amp;quot;Droid Arabic Naskh&amp;quot;, &amp;quot;Geeza Pro&amp;quot;, &amp;quot;Simplified Arabic&amp;quot;, &amp;quot;Noto Sans Thai&amp;quot;, Thonburi, Dokchampa, &amp;quot;Droid Sans Thai&amp;quot;, &amp;quot;Droid Sans Fallback&amp;quot;, -apple-system, &amp;quot;.SFNSDisplay-Regular&amp;quot;, &amp;quot;Heiti SC&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Segoe UI&amp;quot;; line-height: 40px; margin: 2.8rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
JavaScript Syntax&lt;/h2&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
The syntax of JavaScript is the set of rules that define a correctly structured JavaScript program&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;a href="https://en.wikipedia.org/wiki/JavaScript_syntax" rel="noopener nofollow" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: #827be9; margin: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline; word-wrap: break-word;" target="_blank"&gt;Source&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
JavaScript syntax is case sensitive like C , Java ,C# . It's means that CodeMug and codemug are not equal or CODEMUG not equal to codemug or CodeMug.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
JavaScript program is a group of statements.If you familiar with programming in C# or C then you know the term statement terminator which separate one statement from other so at the end of every statement we use &lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" ; "&lt;/span&gt;&amp;nbsp;for separate one statement from other so we can say that every JavaScript statement end with semicolon or new line.&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt; &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;html&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodingMug:First Vila of JavaScript&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;
     alert(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"Welcome to CodeMug"&lt;/span&gt;)
     alert(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"We start JavaScript"&lt;/span&gt;)
   &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
First we use &amp;lt;script&amp;gt; tag that tell browser we use script (like JavaScript&amp;gt; within our html document and within these &amp;lt;script&amp;gt; tag we write our code of JavaScript .&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Our code simply show two dialog boxes when web page is load with the help of JavaScript method "alert".&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Two statement written in two different line ,we are not using semi colon here because JavaScript have ASI (Automatic Semi Colon Insertion) process but in some cases we have to use semi colon so it is good for you to write each statement in new line and use semi colon both together.&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;html&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;
     alert(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"Welcome to CodeMug"&lt;/span&gt;);
     alert(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"We start JavaScript"&lt;/span&gt;);
   &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;h3 style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.9); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Sans Pro&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Hiragino Kaku Gothic Pro&amp;quot;, Meiryo, &amp;quot;Hiragino Sans GB W3&amp;quot;, &amp;quot;Noto Naskh Arabic&amp;quot;, &amp;quot;Droid Arabic Naskh&amp;quot;, &amp;quot;Geeza Pro&amp;quot;, &amp;quot;Simplified Arabic&amp;quot;, &amp;quot;Noto Sans Thai&amp;quot;, Thonburi, Dokchampa, &amp;quot;Droid Sans Thai&amp;quot;, &amp;quot;Droid Sans Fallback&amp;quot;, -apple-system, &amp;quot;.SFNSDisplay-Regular&amp;quot;, &amp;quot;Heiti SC&amp;quot;, &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Segoe UI&amp;quot;; line-height: 32px; margin: 3.2rem 0px 2.4rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-size: 15.21px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;What is Variable?&lt;/span&gt;&lt;/h3&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
For beginner this question is very important but for intermediate level or professional level programmer or you have just how know about programming then ,I am sure you must know about variable but for beginner the definition of variable is&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;nbsp;"Variable are container in which we store values ,they are also changeable ,We use&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;variable for storing a value in memory for later use in program "&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Let discuss variable in detail and take example from real world,variable are changeable so school class is best example of this where students are values and class is variable after the pass out of old student ,new student become the value of class,like this variables are the entity which change its value at the execution of the program.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
In JavaScript we declare variable using the keyword var ,if you declare a variable without assigning it ,its type is undefined by dafault,But the important thing which you always have to remember that if you declare variable without var keyword ,it become implicit global.&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&amp;lt;html&amp;gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript::Variables&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_one;
        alert(variable_one);
     &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
So when we run our program in browser the dialogue box shows the message undefined ,it means you have not assign any value to variable_one.We assing a string literal to variable_one.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;em style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: Georgia, &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 0.975em; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/em&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;em style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-family: Georgia, &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 0.975em; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;String&amp;nbsp;is a plain text,which is wrapped by single quote ' ' or with double quote " ".&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
So we assigning value which is string&amp;nbsp;to variable like this&amp;nbsp;&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt; &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodingMug::String Literal&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;
         variable_one = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"This is string literal"&lt;/span&gt;;
         alert(variable_one);
      &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Now refresh the page in browser and notice that dialogue box shows the message &lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"This is string"&lt;/span&gt;.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Rules for naming variable in JavaScript&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;ul style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 13px; line-height: 3.2rem; margin: 3.2rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Variable name can start with upper or lower case letter of alphabets&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For e.g:&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var person&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var PERSON&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var pERSON&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var PerSon&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;ul style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 13px; line-height: 3.2rem; margin: 3.2rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Variable name can start with ( _ ) and ( $ ) symbol&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For e.g:&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var _Person&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var $Person&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var _PeRsOn&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var $PerSoN&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;ul style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 13px; line-height: 3.2rem; margin: 3.2rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Variable contain numbers but not start with numbers&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For e.g:&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var Person123&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var pErsOn 123&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;ul style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 13px; line-height: 3.2rem; margin: 3.2rem 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; list-style-type: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Variables are case sensitive&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Person not equal to PERSON or person&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
The naming convention of variable usually done in two ways,&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;Camel Case&lt;/span&gt;&amp;nbsp;which start with lowercase letter and then each word is capital like uPERSON and the other use of underscore like _person or new_person on the other way we also use person or PERSON but the above two cases give your code professional look.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Now it's time to play more with variables using variables with html tags like label etc etc,so let start&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;br style="box-sizing: border-box;" /&gt;&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&amp;lt;html&amp;gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript::Variables&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_one"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_two"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_three"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_four"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&lt;/span&gt;
         &amp;nbsp;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;     &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_one = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;'Greeting&amp;nbsp; '&lt;/span&gt;;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;      &amp;nbsp;&lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_two = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"HIE!"&lt;/span&gt;;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;     &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_three = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"from"&lt;/span&gt;;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;     &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_four = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"CodingMug"&lt;/span&gt;;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;     &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_one"&lt;/span&gt;).innerHTML = variable_one;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;     &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_two"&lt;/span&gt;).innerHTML = variable_two;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;     &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_three"&lt;/span&gt;).innerHTML = variable_three;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;     &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_four"&lt;/span&gt;).innerHTML = variable_four;
&amp;nbsp;&amp;nbsp; &amp;nbsp;      &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Now here we declare four variable naming variable_one,varible_two,variable_three,variable_four and assign them a values "Greeting","HIE",''from","CodingMug" respectively ,after that we use JavaScript method&amp;nbsp;&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document.getElementById() &lt;/span&gt;which returns the element of specific id and we use HTML property name innerHTML ,every element have innerHTML property which tell you what is between the opening and closing tag of HTML element.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Take a look of our code if we evaluate our line of code which is&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.getElementById("label_one").innerHTML = a;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
In beginning&amp;nbsp;of our statement we use document.GetElementById because before using innerHTML we must give the element which we want to change so here we use getElementById which return the specific element with id which we write after document.getElementById so come to the code&amp;nbsp;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document.getElementById("label_one").innerHtML = variable_one&amp;nbsp;&amp;nbsp;&lt;/span&gt;means that fetch the element with id "label_one" change its innHTML to value of variable_one&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; font-weight: 700; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;,&lt;/span&gt;same logic for other three line&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Now after above example we play more with string&amp;nbsp;and check how we can join multiple strings together ,In JavaScript we join two or more then two strings by using "+" concatenate operator.In our last example we have four labels what happen if we want to show our four string literal in single html label .&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript::Concatenation&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_one = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;'Greeting  '&lt;/span&gt;;
         &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_two = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"HIE!"&lt;/span&gt;;
         &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_three = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"from"&lt;/span&gt;;
         &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_four = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"CodingMug"&lt;/span&gt;;
         &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; concating_var = variable_one + &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" "&lt;/span&gt; + variable_two + &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" "&lt;/span&gt; +  variable_three + &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" "&lt;/span&gt;  + variable_four;
         &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt;).innerHTML = concating_var;

         &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
So first we assign string literal to our four variables and by using concatenation operator in among these variable we form a single statement and then show it in a single label we use " " for making space between our variables ,we also do the same thing in another way like this&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript::Concatenation&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_one = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;'Greeting  '&lt;/span&gt;;
         variable_one += &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" HIE!"&lt;/span&gt;;
         variable_one += &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" from"&lt;/span&gt;;
         variable_one += &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" CodingMug"&lt;/span&gt;;
         &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt;).innerHTML = variable_one;

         &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
We take only single variable here and concate it with "+=",the result is same ,now move forward and evaluate more the fun of concatenation let suppose we have a number and a string&amp;nbsp;like we have 5 as number&amp;nbsp;and ABC is our string&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Now we concatenate number literal with string literal&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript::Concatenate String Literal With Number Literal&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_one = &lt;span class="hljs-number" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;5&lt;/span&gt;;
         &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_two = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"ABC"&lt;/span&gt;;
         &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; concating_var = variable_one + &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" "&lt;/span&gt; + variable_two ;
         &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt;).innerHTML = concating_var;

         &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Or like this&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript::Concatenate String Literal With Number Literal&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_one = &lt;span class="hljs-number" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;5&lt;/span&gt;;
         variable_one += &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" ABC"&lt;/span&gt;;
        
         &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt;).innerHTML = variable_one;

         &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Now in above both example we use " " with our string and number without single or double quote shows number&amp;nbsp;then concatenation between them give result 5 ABC,Dive more in concatenation&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript::Concatenate String Literal With Number Literal&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_one = &lt;span class="hljs-number" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;5&lt;/span&gt;;
          &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_two = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"5"&lt;/span&gt;;
          &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; concatenate_stringwithnumber = variable_one + variable_two;
         &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt;).innerHTML = concatenate_stringwithnumber;

         &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
The output of above example is "55" , 5 number and "5" is string literal because it is with double quote so when we use concatenate operator between them our result is 55 ,but on the other way + also use for arithmetic operation if we remove double quote from our variable_two so our result will be 10 because without double quote interpreter treat 5 as a number so our concatenate operator(+) working as arithmetic operator for addition operation.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
The another way to concate string in JavaScript is concate string using concat() method like this&lt;/div&gt;
&lt;pre class="ql-syntax" spellcheck="false" style="background: rgb(243, 246, 248); border-radius: 3px; border: 0px; box-sizing: border-box; counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-size: 1.6rem; line-height: 1.6rem; margin-bottom: 5px; margin-top: 3.2rem; outline: 0px; overflow-x: auto; overflow-y: visible; padding: 3.2rem; vertical-align: baseline;"&gt;&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;CodeMug:First Vila of JavaScript::Concatenate String Literal With Number Literal&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;title&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;head&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;id&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt; &lt;span class="hljs-attr" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;style&lt;/span&gt;=&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"color:blue;"&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_one = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"String Concate"&lt;/span&gt;;
          &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_two = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" using concat method"&lt;/span&gt;;
          &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; variable_three = &lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;" another way to concate in JavaScript"&lt;/span&gt;;
          &lt;span class="hljs-keyword" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #009999; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt; concatenate_stringwithnumber = variable_one.concat(variable_two,variable_three)
         &lt;span class="hljs-built_in" style="background: 0px 0px; border: 0px; box-sizing: border-box; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;document&lt;/span&gt;.getElementById(&lt;span class="hljs-string" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #dd1144; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;"label_concate"&lt;/span&gt;).innerHTML = concatenate_stringwithnumber;

         &lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;script&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class="hljs-tag" style="background: 0px 0px; border: 0px; box-sizing: border-box; color: #007700; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;&amp;lt;/&lt;span class="hljs-name" style="background: 0px 0px; border: 0px; box-sizing: border-box; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"&gt;HTML&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Functionally concatenate operator + and concate() method are mostly same but performance wise concatenate operator + better then concat() method.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; color: rgba(0, 0, 0, 0.75); counter-reset: list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0; font-family: &amp;quot;Source Serif Pro&amp;quot;, serif; font-size: 17px; line-height: 3.2rem; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;
Continue in next post&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6nkP6y3G-bTBiNWVwwF0Orpc91vr21NdvM02Gsue1kdTQmCKbgcZ-UZMRLubq5V6JjA_yzNS4cVdjwaMzjEPJQR5vEIx-avLtQvulvYvRH1ktu65mJO2ty7o7GENCyjrsSHBflg0G7AE/s72-c/js.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>  Uncaught TypeError </title><link>http://codingmug.blogspot.com/2018/03/uncaught-typeerror.html</link><author>noreply@blogger.com (Ayesha)</author><pubDate>Sat, 24 Mar 2018 04:31:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1135847635526711555.post-5691391905542422273</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;span style="font-size: x-large;"&gt;&lt;b&gt;&amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Now from beginning of the tutorial series we notice that we write our
 JavaScript in head section on our html page but what happen in this 
that we write our JavaScript within our body tag and after our 
&amp;lt;label&amp;gt; &amp;lt;/label&amp;gt;tags ,what happen if we use JavaScript 
within head lets take look&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiixJBNFbwCE_iBPXHgWVgiD-Dn8vL1s7uvKGq0DVz4xeiSl3SGgR5OLVJemsHJt1JGkR3lTU3aw1GJJvmsGzl0ryUXiAYRdgBVsodGQeAApPS5Ek7dwQ7uVha1j8HDAitutUZj0gsTbtw/s1600/Playwithvariableerror.JPG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="295" data-original-width="514" height="366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiixJBNFbwCE_iBPXHgWVgiD-Dn8vL1s7uvKGq0DVz4xeiSl3SGgR5OLVJemsHJt1JGkR3lTU3aw1GJJvmsGzl0ryUXiAYRdgBVsodGQeAApPS5Ek7dwQ7uVha1j8HDAitutUZj0gsTbtw/s640/Playwithvariableerror.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;
 refreshing our page in browser and we see blank screen ,now we have to 
check the error so if you are using google chrome&amp;nbsp; in windows use 
Ctrl+Shift+J and on Mac Cmd+Option+J ,console screen open on your 
browser which show an error like this&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1RE8paUtOBWqriI2FXabENUgiI3_JwUwLJ_yaaFhbriQ5Zvs55DXSIUcGLbWghipT-oLYxcn3-fM2NLDZ-OE8xQZJfDXb7LdnwFeNZfrfuxs5hEK2LtZxcTCTEHC8aIIAqRhHhwHuzcg/s1600/consoleError.JPG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="317" data-original-width="1279" height="158" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1RE8paUtOBWqriI2FXabENUgiI3_JwUwLJ_yaaFhbriQ5Zvs55DXSIUcGLbWghipT-oLYxcn3-fM2NLDZ-OE8xQZJfDXb7LdnwFeNZfrfuxs5hEK2LtZxcTCTEHC8aIIAqRhHhwHuzcg/s640/consoleError.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Uncaught TypeError:Cannot set property 'innerHTML' of null at (your code line number) click on that line&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9KyYuIqdu6mWJjYkkSJsmrj-1QVjI3c4spVjzYYmmER344sheJRLmWjDPXfqlK58H1-OOV8D3Ki7z3qhgKxOeG0XvaylJI5FxwOjauuhhaztGI3YF9W2rBcnqVdn2TGYN2USW33Pzg2s/s1600/errordesc.JPG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="305" data-original-width="1279" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9KyYuIqdu6mWJjYkkSJsmrj-1QVjI3c4spVjzYYmmER344sheJRLmWjDPXfqlK58H1-OOV8D3Ki7z3qhgKxOeG0XvaylJI5FxwOjauuhhaztGI3YF9W2rBcnqVdn2TGYN2USW33Pzg2s/s640/errordesc.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Now this is time to understand what going behind the scene of our code&lt;br /&gt;
When
 we write JavaScript code inside the &amp;lt;script&amp;gt; tag&amp;nbsp; which is 
present in &amp;lt;head&amp;gt;section of our HTML file,our JavaScript execute 
by our browser rendering engine even before the whole DOM is loaded 
because it load our whole DOM from top to bottom ,when we place our 
script in &amp;lt;head&amp;gt;tag our script execute first then the other 
elements are loaded and our script trying to access the element id 
before it has render by the DOM in result it throw the null error,As we 
want that our label shows on page load with values which we assign to 
our four variables so we write our script after it first DOM load our 
all labels the execute the script .&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiixJBNFbwCE_iBPXHgWVgiD-Dn8vL1s7uvKGq0DVz4xeiSl3SGgR5OLVJemsHJt1JGkR3lTU3aw1GJJvmsGzl0ryUXiAYRdgBVsodGQeAApPS5Ek7dwQ7uVha1j8HDAitutUZj0gsTbtw/s72-c/Playwithvariableerror.JPG" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>