<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Javascript on Raveen Kumar</title>
    <link>https://raveenkumar.com/tags/javascript/</link>
    <description>Recent content in Javascript on Raveen Kumar</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Raveen Kumar</copyright>
    <lastBuildDate>Fri, 17 Feb 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://raveenkumar.com/tags/javascript/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Javascript</title>
      <link>https://raveenkumar.com/library/programming/javascript/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/javascript/</guid>
      <description>&lt;h2 id=&#34;reading-materials&#34;&gt;Reading Materials&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server&#34;&gt;How do you set up a local testing server? - Learn web development | MDN&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics&#34;&gt;https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;document.&lt;span style=&#34;color:#a6e22e&#34;&gt;querySelector&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;html&amp;#34;&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;addEventListener&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; () {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#a6e22e&#34;&gt;alert&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Ouch! Stop poking me!&amp;#34;&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The function we just passed to &lt;code&gt;addEventListener()&lt;/code&gt; here is called an &lt;em&gt;anonymous function&lt;/em&gt;, because it doesn&amp;rsquo;t have a name. There&amp;rsquo;s an alternative way of writing anonymous functions, which we call an &lt;em&gt;arrow function&lt;/em&gt;. An arrow function uses &lt;code&gt;() =&amp;gt;&lt;/code&gt; instead of &lt;code&gt;function ()&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;document.querySelector(&amp;#34;html&amp;#34;).addEventListener(&amp;#34;click&amp;#34;, () =&amp;gt; {&#xA;  alert(&amp;#34;Ouch! Stop poking me!&amp;#34;);&#xA;});&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Add disqus command to your web page</title>
      <link>https://raveenkumar.com/posts/2022-09-16-how-to-add-disqus-comment-section-to-your-website/</link>
      <pubDate>Fri, 16 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-09-16-how-to-add-disqus-comment-section-to-your-website/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;Login to disqus&lt;/li&gt;&#xA;&lt;li&gt;Go to: &lt;a href=&#34;https://disqus.com/admin/universalcode/&#34;&gt;https://disqus.com/admin/universalcode/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Copy paste the universal code into your web page&lt;/li&gt;&#xA;&lt;li&gt;Now when you serve your html page you should get a disqus comment section&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
  </channel>
</rss>
