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

<channel>
	<title>Array operators Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/array-operators/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/array-operators/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 13 Apr 2022 16:30:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Complete Tutorial of Associative Arrays</title>
		<link>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/</link>
					<comments>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Thu, 05 Aug 2021 12:54:00 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Array operators]]></category>
		<category><![CDATA[Associative Arrays]]></category>
		<category><![CDATA[Complete Tutorial of Arrays]]></category>
		<category><![CDATA[Creating an associative array]]></category>
		<category><![CDATA[Features of Associative Arrays]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Some Features of Associative Arrays]]></category>
		<category><![CDATA[Traversing the Associative Array]]></category>
		<category><![CDATA[Tutorial for Array operators]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is Associative Arrays]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7453</guid>

					<description><![CDATA[<p>What is Associative Arrays? Key value pairs are stored in associative arrays. For example, a numerically indexed array might not [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/">Complete Tutorial of Associative Arrays</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">What is Associative Arrays?</h2>



<p class="wp-block-paragraph">Key value pairs are stored in associative arrays. For example, a numerically indexed array might not be the ideal choice for storing a student&#8217;s marks from several subjects in an array. Instead, we might use the names of the subjects as the keys in our associative array, with their appropriate marks as the value.</p>



<p class="wp-block-paragraph"><strong>Example:-</strong></p>



<script src="https://gist.github.com/AdarshAshwani/dfae25be6f36c8b7aa40b371990b522c.js"></script>



<p class="wp-block-paragraph"><strong>Output:</strong>&#8211;</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="444" height="174" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-39.png" alt="" class="wp-image-7457" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-39.png 444w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-39-300x118.png 300w" sizes="(max-width: 444px) 100vw, 444px" /></figure></div>



<h3 class="wp-block-heading">Some Features of Associative Arrays?</h3>



<p class="wp-block-paragraph">Associative arrays are similar to numeric arrays in appearance, but differ in terms of index. An associative array&#8217;s index is a string that establishes a strong relationship between key and value.</p>



<p class="wp-block-paragraph">For storing employee wages in an array, a numerically indexed array is not the ideal choice. Instead, you may create an associative list with the workers&#8217; names as keys and their salary as the value.</p>



<ul class="wp-block-list"><li>The variable&#8217;s name is &#8220;$variable name…&#8221;, the element&#8217;s access index number is &#8220;[&#8216;key name&#8217;],&#8221; and the array element&#8217;s value is &#8220;value.&#8221;</li><li>Consider the following scenario: you have a group of people and want to assign gender to each of them based on their names.</li><li>You may achieve this by using an associative list.</li><li>You can do so by using the code below.</li></ul>



<h4 class="wp-block-heading"><strong>Traversing the Associative Array</strong>:-</h4>



<p class="wp-block-paragraph">Loops may be used to go over associative arrays. The associative array can be looped through in two different ways. Using the for loop first, and then the foreach loop second.</p>



<p class="wp-block-paragraph"><strong>Example:-</strong></p>



<p class="wp-block-paragraph">In this case, the array keys() function is used to identify indices with provided names, and the count() method is used to count the number of indices in associative arrays.</p>



<script src="https://gist.github.com/AdarshAshwani/587ce0731aeac39c67296144ec7ae2de.js"></script>



<p class="wp-block-paragraph"><strong>Output:-</strong></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="559" height="362" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-40.png" alt="" class="wp-image-7458" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-40.png 559w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-40-300x194.png 300w" sizes="(max-width: 559px) 100vw, 559px" /></figure></div>



<h4 class="wp-block-heading"><strong>Creating an associative array of mixed types</strong>:-</h4>



<script src="https://gist.github.com/AdarshAshwani/a46ba22f51b28c585cb00fac1b8c4dc0.js"></script>



<p class="wp-block-paragraph"><strong>Output:-</strong></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="342" height="111" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-41.png" alt="" class="wp-image-7459" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-41.png 342w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-41-300x97.png 300w" sizes="(max-width: 342px) 100vw, 342px" /></figure></div>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/">Complete Tutorial of Associative Arrays</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Complete Tutorial of Arrays</title>
		<link>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/</link>
					<comments>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Wed, 04 Aug 2021 13:14:18 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Array operators]]></category>
		<category><![CDATA[Complete]]></category>
		<category><![CDATA[Complete Tutorial of Arrays]]></category>
		<category><![CDATA[How many types of Array]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Some Array Operators]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7404</guid>

					<description><![CDATA[<p>What is Array? Arrays are collections of data elements with a common name. Arrays provide a framework for defining and [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/">Complete Tutorial of Arrays</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is <strong>Array</strong>?</h3>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://slideplayer.com/slide/9578761/31/images/2/What+is+Array.jpg" alt="Arrays. - ppt download"/></figure></div>



<p class="wp-block-paragraph">Arrays are collections of data elements with a common name. Arrays provide a framework for defining and accessing several data elements with a single identity, making data administration easier.</p>



<p class="wp-block-paragraph">When dealing with several data elements, we use array.</p>



<h3 class="wp-block-heading">How many types of Array?</h3>



<ul class="wp-block-list"><li><strong>Numeric/Indexed Array</strong>:- In this array index will be represented by a number. By default numeric array index start from 0.<br><strong>Example:-</strong><code><span class="has-inline-color has-vivid-red-color"><strong> $num [0] = “ScmGalaxy”;</strong></span></code></li><li><strong>Associative Array</strong>:- In this Array index/key will be represented by a string.<br><strong>Example:-</strong> <strong><code><span class="has-inline-color has-vivid-red-color">$fees [“ScmGalaxy”] = 500;</span></code></strong></li><li><strong>Multidimensional Array</strong>:- Arrays of Arrays is known as multidimensional arrays.<br><strong>Example:-</strong> <strong><code><span class="has-inline-color has-vivid-red-color">$num [0] [0] = 25;</span></code></strong></li></ul>



<h3 class="wp-block-heading">Some Array Operators are :-</h3>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="889" height="389" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-32.png" alt="" class="wp-image-7409" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-32.png 889w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-32-300x131.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-32-768x336.png 768w" sizes="auto, (max-width: 889px) 100vw, 889px" /></figure></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/">Complete Tutorial of Arrays</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How do you use Arrays in JavaScript?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-do-you-use-arrays-in-javascript/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-do-you-use-arrays-in-javascript/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Wed, 04 Aug 2021 11:28:13 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Array operators]]></category>
		<category><![CDATA[elements]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[properties]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7380</guid>

					<description><![CDATA[<p>Array Arrays are a collection of data items stored under a single name. Array provides a mechanism for declaring and [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-do-you-use-arrays-in-javascript/">How do you use Arrays in JavaScript?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Array</h2>



<p class="wp-block-paragraph">Arrays are a collection of data items stored under a single name. Array provides a mechanism for declaring and accessing several data items with only one identifier, thereby simplifying the task of data management.</p>



<p class="wp-block-paragraph">We use an array when we have to deal with multiple data items. Arrays are a special type of object. The typeof operator in JavaScript returns &#8220;object&#8221; for arrays.</p>



<h2 class="wp-block-heading">Declaration and initialization of Array</h2>



<ul class="wp-block-list"><li><strong>Using Array Literal</strong></li></ul>



<p class="wp-block-paragraph">Syntax: &#8211; var array_name = [ ];</p>



<script src="https://gist.github.com/vijaypk376/fa503b7d5abe497880300ce5f1a37b78.js"></script>



<h2 class="wp-block-heading">Declaration and initialization of Array</h2>



<ul class="wp-block-list"><li><strong>Using Array Literal</strong></li></ul>



<p class="wp-block-paragraph"><strong>Syntax: &#8211; var array_name = [value1, value2, value_n];</strong></p>



<script src="https://gist.github.com/vijaypk376/748c8cf51854dd27059a44340873cf5c.js"></script>



<h2 class="wp-block-heading">Declaration and initialization of Array</h2>



<ul class="wp-block-list"><li><strong>Using Array Constructor</strong></li></ul>



<p class="wp-block-paragraph"><strong>Syntax: &#8211; var array_name = new Array( );</strong></p>



<script src="https://gist.github.com/vijaypk376/39108e2f54d937813bd1efd74df06da2.js"></script>



<h2 class="wp-block-heading">Declaration and initialization of Array</h2>



<ul class="wp-block-list"><li><strong>Using Array Constructor</strong></li></ul>



<script src="https://gist.github.com/vijaypk376/d30543b26f06a19e03b35f113b6010d9.js"></script>



<script src="https://gist.github.com/vijaypk376/fbec2a8ebcebc6245f963a478a99e90d.js"></script>



<p class="wp-block-paragraph">This will create an empty array with 5 lengths. So this is not a good idea to use Array<br>Constructor if you have only a single numeric value.</p>



<p class="wp-block-paragraph">Note &#8211; By default, the array starts with index 0.</p>



<h2 class="wp-block-heading">Important Points</h2>



<ul class="wp-block-list"><li>JavaScript arrays are zero-indexed: the first element of an array is at index 0.</li><li>Using an invalid index number returns undefined.</li><li>It&#8217;s possible to quote the JavaScript array indexes as well (e.g., geek[&#8216;2&#8217;] instead of geek[2]), although it&#8217;s not necessary.</li><li>Arrays cannot use strings as element indexes but must use integers.</li><li>There is no associative array in JavaScript. geek[“fees”] = 200;</li><li>No advantage to use Array Constructor so better to use Array Literal for creating Arrays in JavaScript.</li></ul>



<h2 class="wp-block-heading">Accessing Array Elements</h2>



<script src="https://gist.github.com/vijaypk376/6165a1f848c416fd2b00af0a95c3e9c9.js"></script>



<h2 class="wp-block-heading">Accessing Array Elements</h2>



<p class="wp-block-paragraph"><strong>Access all at once</strong></p>



<script src="https://gist.github.com/vijaypk376/95e2b35d5cb8e3ad1bd06200984f18f3.js"></script>



<h2 class="wp-block-heading">Modifying Array Elements</h2>



<script src="https://gist.github.com/vijaypk376/a54ea2809380ab1f44aa5286960663d6.js"></script>



<h2 class="wp-block-heading">Removing Array Elements</h2>



<p class="wp-block-paragraph">Array elements can be removed using the delete operator. This operator sets the array element it is invoked on to undefined but does not change the array‟s length.</p>



<p class="wp-block-paragraph"><strong>Syantx :- delete Array_name[index];<br>Ex:- delete dev[0];</strong></p>



<h2 class="wp-block-heading">Length Property</h2>



<p class="wp-block-paragraph">The length property retrieves the index of the next available position at the end of the array. The length property is automatically updated as new elements are added to the array. For this reason, length is commonly used to iterate through all elements of an array.</p>



<script src="https://gist.github.com/vijaypk376/7f3af0f0cbf9f7287e95ecceb376ec6b.js"></script>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-do-you-use-arrays-in-javascript/">How do you use Arrays in JavaScript?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-do-you-use-arrays-in-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tutorial for Array operators</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorial-for-array-operators/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorial-for-array-operators/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Mon, 26 Jul 2021 13:00:26 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Array operators]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Php Array operators]]></category>
		<category><![CDATA[PHP Operators]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Tutorial for Array operators]]></category>
		<category><![CDATA[What is Array Operators]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7060</guid>

					<description><![CDATA[<p>What is Array Operators? The array operators are used to compare arrays. To compare various arrays, use the operations shown [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-array-operators/">Tutorial for Array operators</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is Array Operators?</h3>



<p class="wp-block-paragraph">The array operators are used to compare arrays. To compare various arrays, use the operations shown below. Make sure you&#8217;re using proper grammar.</p>



<ul class="wp-block-list"><li>Operator Name Example Result</li><li><code>+</code> Union <code>$x + $y</code> Union of $x and $y</li><li><code>==</code> Equality <code>$x == $y </code>Returns true if <code>$x </code>and<code> $y </code>have the same key/value pairs</li><li><code>=== </code>Identity<code> $x === $y </code>Returns true if<code> $x</code> and <code>$y</code> have the same key/value pairs in the same order and of the same types</li><li><code>!= </code>Inequality <code>$x != $y</code> Returns true if <code>$x</code> is not equal to <code>$y</code></li><li><code>&lt;> </code>Inequality <code>$x &lt;> $y </code>Returns true if <code>$x</code> is not equal to<code> $y</code></li><li><code>!== </code>Non-identity <code>$x !== $y</code> Returns true if <code>$x</code> is not identical to <code>$y</code></li></ul>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://www.devopsschool.com/blog/wp-content/uploads/2021/05/image-26.png" alt=""/></figure></div>



<p class="wp-block-paragraph"><strong>Example:-</strong></p>



<script src="https://gist.github.com/AdarshAshwani/87d7104ab61f26805318e46f132a58f1.js"></script>



<p class="wp-block-paragraph"><strong>Output:-</strong></p>



<figure class="wp-block-image"><img decoding="async" src="https://www.devopsschool.com/blog/wp-content/uploads/2021/05/image-27.png" alt=""/></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-array-operators/">Tutorial for Array operators</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/tutorial-for-array-operators/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
