<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Rajat_Arya</title>
    <description>The latest articles on Forem by Rajat_Arya (@rajatarya007zxc).</description>
    <link>https://forem.com/rajatarya007zxc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F453599%2F673d7063-8bad-4d9d-9dc3-f7a69b80a0d2.png</url>
      <title>Forem: Rajat_Arya</title>
      <link>https://forem.com/rajatarya007zxc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rajatarya007zxc"/>
    <language>en</language>
    <item>
      <title>Sometimes JavaScript is Tricky.</title>
      <dc:creator>Rajat_Arya</dc:creator>
      <pubDate>Sat, 30 Jan 2021 19:07:56 +0000</pubDate>
      <link>https://forem.com/rajatarya007zxc/sometimes-javascript-is-tricky-67j</link>
      <guid>https://forem.com/rajatarya007zxc/sometimes-javascript-is-tricky-67j</guid>
      <description>&lt;p&gt;When I was new in Web Development, I faced many difficulties while learning JavaScript, but after regular practice, my views changed.&lt;/p&gt;

&lt;p&gt;To be honest, still  Javascript changes my perspective, but it also gives me more strength to work hard on it.&lt;/p&gt;

&lt;p&gt;I accumulated some questions from the internet and I am sure this will change your views too.&lt;/p&gt;

&lt;p&gt;But before going straight to the questions:-&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;"The Expert in anything was once a beginner"&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Ln2dAW9oycjgmTpjX9/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Ln2dAW9oycjgmTpjX9/giphy.gif" width="400" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Q1- What is typeof []&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Answer: Object. Actually Array is derived from Object. If you want to check array use Array.isArray(arr)&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q2- What is 2+true&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Answer: 3. The plus operator between a number and a boolean or two boolean will convert boolean to number. Hence, true converts to 1 and you get result of 2+1.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q3- What is '6'+9&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Answer: 69. If one of the operands of the plus (+) operator is string it will convert other number or boolean to string and perform a concatenation.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q4- What's the output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The postfix unary operator(a++) &lt;br&gt;
First it returns 0 and after that increment a by 1 means now a=1.&lt;/p&gt;

&lt;p&gt;The prefix unary operator(++a)&lt;br&gt;
First increment by 1 and then return means now a=2&lt;/p&gt;

&lt;p&gt;Answer: 0 2 2&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q5- What's the output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;myAge&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;myAge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer: Object.The rest parameter (...args) lets us "collect" all remaining arguments into an array. An array is an object, so typeof args returns "object".&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q6- What's the output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;confusing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;one&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;two&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;three&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;confusing&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer: If you have two keys with the same name, the key will be replaced. It will still be in its first position, but with the last specified value.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q7- What's the output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer: 1 2 4.The continue statement skips an iteration if a certain condition returns true.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q8- What's the output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answwer:7.The comma operator evaluates each of its operands (from left to right) and returns the value of the last operand.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q9- What is the value of !'Sleep'?&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Answer:False. ! is NOT. If you put ! in front of truthy values, it will return false.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q10-What the logged output when you click the paragraph?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"console.log('div')"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"console.log('p')"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Click here!
  &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer: p div. If we click p, we see two logs: p and div. During event propagation, there are 3 phases: capturing, target, and bubbling. By default, event handlers are executed in the bubbling phase (unless you set useCapture to true). It goes from the deepest nested element outwards.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q11- What is the output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Rajat Arya&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; is &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer: Rajat Arya is 23&lt;br&gt;&lt;br&gt;
function hello(age) {&lt;br&gt;
  return &lt;code&gt;${this.name} is ${age}&lt;/code&gt;;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Explanation:- With both, we can pass the object to which we want the &lt;b&gt;'this'&lt;/b&gt; keyword to refer to. However,&lt;b&gt; .call&lt;/b&gt; is also executed immediately!&lt;br&gt;
&lt;b&gt;.bind &lt;/b&gt; returns a copy of the function, but with a bound context! It is not executed immediately.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q12- What's the output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;think&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nf"&gt;think&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer:number The &lt;b&gt;think&lt;/b&gt; function returns the returned value of the immediately invoked function expression (IIFE). This function returned 0, which is type "number".&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q13- What's the output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer:When you set a value to an element in an array that exceeds the length of the array, JavaScript creates something called "empty slots". These actually have the value of undefined, but you will see something like:&lt;br&gt;
&lt;br&gt;&lt;br&gt;
[1, 2, 3, empty x 7, 11]&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q14-What's the Output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer: string. From right typeof 1 returns "number". typeof "number" returns "string"&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Q15-What's the Output?&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;myName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Rajat&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Answer:&lt;b&gt; ["R","a","j","a","t"]&lt;/b&gt;&lt;br&gt;
A string is an iterable. The spread operator maps every character of an iterable to one element.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>career</category>
      <category>html</category>
    </item>
    <item>
      <title>While Learning HTML,CSS,JAVASCRIPT....</title>
      <dc:creator>Rajat_Arya</dc:creator>
      <pubDate>Fri, 29 Jan 2021 12:12:40 +0000</pubDate>
      <link>https://forem.com/rajatarya007zxc/while-learning-html-css-javascript-334c</link>
      <guid>https://forem.com/rajatarya007zxc/while-learning-html-css-javascript-334c</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn9ttefw9fg4e5e8kwo3s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn9ttefw9fg4e5e8kwo3s.png" alt="Alt Text" width="772" height="415"&gt;&lt;/a&gt;&lt;br&gt;
No doubt &lt;strong&gt;HTML, CSS, JavaScript&lt;/strong&gt; is indispensable for Web Development but along with this you should learn and develop these things also which I described in this post.&lt;/p&gt;

&lt;p&gt;To put it bluntly, it is difficult for beginners to adopt this habit, but you have to trust me -&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"If you do things repeatedly, it soon becomes a habit"&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  1- &lt;strong&gt;Reading Documentation and other Codes&lt;/strong&gt;
&lt;/h1&gt;




&lt;p&gt;&lt;a href="https://i.giphy.com/media/5UDqt2tYLu2Qfhjngr/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/5UDqt2tYLu2Qfhjngr/giphy.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before going straight to the programming, we should need to look through the Documentation first.&lt;/p&gt;

&lt;p&gt;Documentation is helpful to get detailed information about the language and gives us an idea about how we can use it in our program.&lt;/p&gt;

&lt;p&gt;You don’t need to read complete documentation, you can take a glance whenever you stuck in your program.&lt;/p&gt;

&lt;p&gt;I think the reading habit is essential for developers because the developer has to look for the solution in different articles or from the other developer codes and this will only occur when a person has the consistency to read.&lt;/p&gt;

&lt;h2&gt;
  
  
  2-&lt;strong&gt;Git&lt;/strong&gt;
&lt;/h2&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8w1b05zhofrn9w9bzbel.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8w1b05zhofrn9w9bzbel.jpg" alt="Alt Text" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.&lt;/p&gt;

&lt;p&gt;It is easy to learn, and it’s extremely useful for tracking workflow there is no need to learn all its commands, you can start with a few commands also.&lt;/p&gt;

&lt;p&gt;In git where you can put your code file along with the commit, which helps to track your changes on code, you can clone a repository from GitHub to your local computer, add or remove files, pull request, etc.&lt;/p&gt;

&lt;p&gt;I will put a link from its official website for you so you can get all the git commands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://git-scm.com/docs/git#_git_commands%20%E2%80%9C&amp;gt;%20Git%20Command&amp;lt;/a&amp;gt;&amp;lt;br&amp;gt;%0A&amp;lt;a%20href="&gt;Commands &lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3-&lt;strong&gt;Consistent Practice&lt;/strong&gt;
&lt;/h1&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7y0vgibdvq9juqv2dt9q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7y0vgibdvq9juqv2dt9q.jpg" alt="Alt Text" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Consistent Practice leads to Success”.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Practice makes a man perfect, everyone knows the power of practice.&lt;/p&gt;

&lt;p&gt;When you are in your learning journey and you never practice what you learned, sorry bro this will not be going to count for your progress, it just a waste of time.&lt;/p&gt;

&lt;p&gt;This is the only thing that can make a vast difference between a Good Developer and an average one.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Everything is hard Before it is Easy”&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
To make things easy, you need to practice it every day.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  4-&lt;strong&gt;Escape From the Tutorial Hell&lt;/strong&gt;
&lt;/h1&gt;




&lt;p&gt;“Sometimes if you do more than enough without any plan, maybe it does not give you a desirable result” this statement is perfectly suitable when we are new in programming.&lt;/p&gt;

&lt;p&gt;What is Tutorial Hell?&lt;/p&gt;

&lt;p&gt;When we starting any programming language we looking for a tutorial that can teach us and after completing it we go to another one without any practice, it leads us to nowhere we just trapped in a loop.&lt;br&gt;
&lt;a href="https://i.giphy.com/media/QvMlVkJ3XSSj9cOxDM/source.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/QvMlVkJ3XSSj9cOxDM/source.gif" width="440" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of the beginners are in the tutorial hell, where they think by just watching more tutorials they become good at that language, but this will not going to happen.&lt;/p&gt;

&lt;p&gt;There is only one solution for this, stop after completing the tutorial. Try to make some projects where you can apply most of your knowledge. By making projects on your own you develop a certain mindset on approaching problems.&lt;/p&gt;

&lt;h1&gt;
  
  
  5- &lt;strong&gt;Stackoverflow&lt;/strong&gt;
&lt;/h1&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk6fz3a2c1cz3pgfpgdbh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk6fz3a2c1cz3pgfpgdbh.jpg" alt="Alt Text" width="369" height="136"&gt;&lt;/a&gt;&lt;br&gt;
Most people would be familiar with the stack overflow, but it is also important for the newbie as well.&lt;br&gt;
Stack Overflow is a question-and-answer site for professional and enthusiast programmers. It has over 50+ Million visitors every month, 51000 registered reputed developers, and over 19 million answers.&lt;br&gt;
It is the most trusted website by developers where people asked their queries and some professional developer answer them.&lt;br&gt;
If you search for an answer to your problem, tons of developers who had faced the same problem as yours have already asked for it… and there is more possibility these answers to that question are on StackOverflow!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>intermediate</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Best Gems for beginners.</title>
      <dc:creator>Rajat_Arya</dc:creator>
      <pubDate>Sun, 17 Jan 2021 09:53:54 +0000</pubDate>
      <link>https://forem.com/rajatarya007zxc/best-gems-for-beginners-1dhb</link>
      <guid>https://forem.com/rajatarya007zxc/best-gems-for-beginners-1dhb</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F16wtmnjpqlgmpup8aduf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F16wtmnjpqlgmpup8aduf.png" alt="Alt Text" width="800" height="285"&gt;&lt;/a&gt;&lt;br&gt;
 When we want to learn any new language, the first thing that came to our mind is that " I should find the tutorial on YouTube", and no doubt &lt;strong&gt;YouTube&lt;/strong&gt; is the best free resource to learn. &lt;br&gt;
It's very helpful if you find a good instructor on Youtube because it helps you to understand the basic concept of the technology much better than reading all of them.&lt;br&gt;
I collected Five  YouTube channels here that offer both in-depth tutorials and quick tip videos that make it easy to expand your &lt;strong&gt;Web Development&lt;/strong&gt; skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  1-The Net Ninja
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flourr3x8s8g7qjpcxtpx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flourr3x8s8g7qjpcxtpx.png" alt="Alt Text" width="272" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The person behind this wonderful channel is Shaun and he is one of the best full-stack developers on youtube. &lt;br&gt;
His tutorial also helps those who never did any coding in their entire life.&lt;br&gt;
 I will definitely recommend everyone to visit and try to learn from him.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some of his playlist&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML &amp;amp; CSS&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;li&gt;React.js,Vue.js,Node,js and etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2- Traversy Media
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8ld49wb1bv7mpxw7rszw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8ld49wb1bv7mpxw7rszw.jpg" alt="Alt Text" width="406" height="124"&gt;&lt;/a&gt;&lt;br&gt;
The man who has a solution for every problem, he has a large variety of playlists in which he covers mostly the language of Web technology. He also Shares his work experience and being a software developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Youtube Playlist on Traversary Media&lt;/strong&gt; :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FullStack React and Django&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;React.js Project and etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3- WebDevSimplified
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2c6umiexmu5ete0ddwbg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2c6umiexmu5ete0ddwbg.jpg" alt="Alt Text" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Open up your notebook when you visit this channel it is a pure tutorial experience.&lt;br&gt;
 If you are the kind of person, who likes to take 15-30 minutes a day for professional development, check this channel out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Youtube videos on WebDevSimplified&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-Time Chat App&lt;/li&gt;
&lt;li&gt;AI Face Detection using Js
&lt;/li&gt;
&lt;li&gt;Design Photoshop Clone etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4-Dev Ed
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F97fox80bagmmcr09zm9w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F97fox80bagmmcr09zm9w.jpg" alt="Alt Text" width="300" height="168"&gt;&lt;/a&gt;&lt;br&gt;
This youtube channel covers those problems that we face in the development of any website like making a logo, small animation, freelancing, photoshop, etc. He has a very interesting playlist that you should check out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best YouTube videos on DevEd&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Figma Tutorial&lt;/li&gt;
&lt;li&gt;Animation using Vanilla Javascript&lt;/li&gt;
&lt;li&gt;Python Tutorial&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5-FreeCodeCamp
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3dmfk77w2ejoai1mu6vg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3dmfk77w2ejoai1mu6vg.png" alt="Alt Text" width="800" height="326"&gt;&lt;/a&gt;&lt;br&gt;
It is the most popular youtube channel which has a tutorial on most of the programming languages, here you can find the complete website making, App development as well as machine learning tutorials.&lt;br&gt;
 This channel provides tutorials on the topic like  HTML, CSS, jQuery, JavaScripts, React.js, SQL, and Ruby, etc. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Youtube Playlist of FreeCodeCamp&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DevOps&lt;/li&gt;
&lt;li&gt;Machine Learning&lt;/li&gt;
&lt;li&gt;Game Development and etc.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
