<?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>DEV Community: Jagveer Gagaan</title>
    <description>The latest articles on DEV Community by Jagveer Gagaan (@jagveergagaan).</description>
    <link>https://dev.to/jagveergagaan</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%2F983390%2F87d367f2-8cec-4314-87d6-e259c72f152e.jpeg</url>
      <title>DEV Community: Jagveer Gagaan</title>
      <link>https://dev.to/jagveergagaan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jagveergagaan"/>
    <language>en</language>
    <item>
      <title>Revision on JavaScript arrays and it's operations.</title>
      <dc:creator>Jagveer Gagaan</dc:creator>
      <pubDate>Wed, 07 Dec 2022 05:10:03 +0000</pubDate>
      <link>https://dev.to/jagveergagaan/revision-on-javascript-arrays-and-its-operations-44ni</link>
      <guid>https://dev.to/jagveergagaan/revision-on-javascript-arrays-and-its-operations-44ni</guid>
      <description>&lt;p&gt;so, I was just thinking of writing something and then this came in my mind about revise the array of javascript and it's operations.&lt;br&gt;
let's start with what is array in javascript and if I put it very simple array is just rack where we store same or distinct things in order, so basically, this is array.&lt;/p&gt;

&lt;p&gt;Now let's see declaration of arrays :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let ourArray = [ "a", "b", "c" ];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note :- array have index value which help to access the element of array and the start value is always 0(zero).&lt;/p&gt;

&lt;p&gt;For Example :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let ourVariable = ourArray[0];

console.log(ourVariable);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, ourVariable have value of "a", which is same that we have at index[0] in ourArray array.&lt;/p&gt;

&lt;p&gt;One more thing we can also change value at different index.&lt;br&gt;
Example :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ourArray[1] = "not b anymore";

console.log(ourArray);

// Expected Output
// [ "a", "not b anymore", "c" ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above code show how we can change values at different index locations in Arrays.&lt;/p&gt;

&lt;h3&gt;
  
  
  Operation on Array
&lt;/h3&gt;

&lt;p&gt;There are mainly four types of operations anyone can do on Arrays which are push(), unshift(), pop() and shift().&lt;/p&gt;

&lt;p&gt;let's discuss all of them in detail now firstly we will see push() method.&lt;/p&gt;

&lt;h3&gt;
  
  
  push() :-
&lt;/h3&gt;

&lt;p&gt;this method adds elements to the end of an array.&lt;/p&gt;

&lt;p&gt;Example :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let ourArray = [ "a", "b", "c" ];

ourArray.push("d");

console.log(ourArray); // output =&amp;gt; [ "a", "b", "c", "d" ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we can see "d" at the end of array list at index[3] and it is because push() method adds element at the end of array.&lt;/p&gt;

&lt;h3&gt;
  
  
  unshift() :-
&lt;/h3&gt;

&lt;p&gt;It adds elements at the front of array.&lt;/p&gt;

&lt;p&gt;Example :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let ourArray = [ "a", "b", "c" ];

ourArray.unshift("d");

console.log(ourArray); // output =&amp;gt; [ "d", "a", "b", "c" ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, in this case, element will get added at the start of array because of unshift() method as it adds element at the start of array and we can see "d" here at the beginning.&lt;/p&gt;

&lt;h3&gt;
  
  
  pop() :-
&lt;/h3&gt;

&lt;p&gt;as you know by name it help to remove an element from the array but remember it specifically remove element from end of array (or from index[n] ) and if I have to put it simple, you can say that it is totally opposite of push() method.&lt;/p&gt;

&lt;p&gt;Example :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let ourArray = [ "a", "b", "c" ];

let popped = ourArray.pop();

console.log(ourArray);   // output =&amp;gt; [ "a", "b"];
console.log(popped);    // output =&amp;gt; "c" ;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the variable "popped" will have value that has be popped from "ourArray".&lt;/p&gt;

&lt;h3&gt;
  
  
  shift() :-
&lt;/h3&gt;

&lt;p&gt;just like pop() opposite of push() method, here you can assume by name that it might be opposite of unshift() method and you are absolute right.&lt;br&gt;
basically shift() method remove element from the start of an array or can say from zeroth index "index[0]".&lt;/p&gt;

&lt;p&gt;Example :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let ourArray = [ "a", "b", "c" ];

let shifted= ourArray.shift();

console.log(ourArray);   // output =&amp;gt; [ "b", "c"];
console.log(shifted);    // output =&amp;gt; "a" ;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are more oprations that someone can perform on array and we will discuss those later in the line of next post.&lt;/p&gt;

&lt;h3&gt;
  
  
  So, see ya fellas have a nice day : )
&lt;/h3&gt;

</description>
      <category>javascript</category>
      <category>array</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>An Introduction to JavaScript in Hindi</title>
      <dc:creator>Jagveer Gagaan</dc:creator>
      <pubDate>Sat, 03 Dec 2022 02:50:52 +0000</pubDate>
      <link>https://dev.to/jagveergagaan/an-introduction-to-javascript-in-hindi-b51</link>
      <guid>https://dev.to/jagveergagaan/an-introduction-to-javascript-in-hindi-b51</guid>
      <description>&lt;h1&gt;
  
  
  An Introduction to JavaScript in Hindi
&lt;/h1&gt;

&lt;p&gt;चलो देखते है की JavaScript में ख़ास क्या है , हम इस्से क्या कर सकते है और ऐसी कौनसी Technologies है जो JavaScript के साथ सबसे अच्छी रहेंगी&lt;/p&gt;

&lt;h2&gt;
  
  
  What is JavaScript ? &lt;strong&gt;&lt;sup&gt;JavaScript क्या है&lt;/sup&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;JavaScript को शुरू में web pages को alive करने के लिए develop किया गया था&lt;/p&gt;

&lt;p&gt;Basic Example : - जैसे हम किसी site के button पर click करते है तो हम किसी दूसरे page पर चले जाते है. ये एक बिलकुल basic functionality थी उस time की जब JavaScript को develop किया गया था ( NOTE :- लेकिन अब ये काम HTML से हो जाता है जो पहले नहीं होता था )&lt;/p&gt;

&lt;p&gt;जो programs JavaScript की मदद से develop किये जाते थे उनने scripts कहा जाता था और आज भी हम इन programs को scripts के नाम से ही जानते है. ये programs directly HTML में लिखे जा सकते है और ये programs/scripts automatically जब भी कोई पेज लोड होता है तो run होते है . इन programs/scripts को चलाने के लिए कोई special preparation या compilation की जरूरत नहीं होती.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;इन्ही कारणों की वजह से जो JavaScript है वो बिलकुल अलग है&lt;/strong&gt; &lt;a href="https://en.wikipedia.org/wiki/Java_(programming_language)"&gt;&lt;strong&gt;Java&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;से&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;आज के समय में JavaScript ना सिर्फ browser में बल्कि server पर या ऐसा कोई भी device जिसमे एक special program है वहा चलाई जा सकती है. जिसका नाम है &lt;a href="https://en.wikipedia.org/wiki/JavaScript_engine"&gt;the JavaScript Engine&lt;/a&gt; (special program name).&lt;/p&gt;

&lt;p&gt;Browser में एक embedded engine होता है जिसे हम "JavaScript Virtual Machine" के नाम से भी जानते है.&lt;/p&gt;

&lt;p&gt;हर एक JavaScript engine के अलग अलग special नाम होते है. For example :-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;V8 - in Chrome, Opera and Edge web browser&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spider Monkey - in Firefox&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;इसका मतलब है अगर कोई feature V8 engine में support करेगा तो वो Chrome, Opera and Edge web browser में भी चलेगा.&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes JavaScript unique ? &lt;strong&gt;&lt;sup&gt;JavaScript सबसे अलग क्यों है&lt;/sup&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;यह पर तीन ऐसी बाते है जो बहुत ही अच्छी है JavaScript से related&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;HTML/CSS के साथ पूरी तरह से काम करना ( full Integration)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;जो काम आसानी से होना चाहिए वो आसानी से ही होता है&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript सभी browsers को support करती है और ये पहले से ही enabled (by default) होती है&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;सिर्फ JavaScript ही एक ऐसी technology है जो ये तीन काम कर सकती है और इन्ही कारणों की वजह से JavaScript सबसे अलग (unique) है&lt;/p&gt;

&lt;p&gt;JavaScript सबसे famous tool है browser interface बनाने के लिए, इस्से अलग JavaScript का इस्तेमाल Server, mobile applications आदि बनाने क लिए भी किया जाता है.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>javascriptinhindi</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
