<?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>forEach Loop Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/foreach-loop/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/foreach-loop/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 13 Apr 2022 16:30:46 +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>How do you use in for loops in JavaScript?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-do-you-use-in-for-loops-in-javascript/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-do-you-use-in-for-loops-in-javascript/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Wed, 04 Aug 2021 11:44:57 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[for loops]]></category>
		<category><![CDATA[forEach Loop]]></category>
		<category><![CDATA[Javascript]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7383</guid>

					<description><![CDATA[<p>for loop with Array forEach Loop The forEach calls a provided function once for each element in an array, in [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-do-you-use-in-for-loops-in-javascript/">How do you use in for loops 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">for loop with Array</h2>



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



<h2 class="wp-block-heading">forEach Loop</h2>



<p class="wp-block-paragraph">The forEach calls a provided function once for each element in an array, in order.</p>



<p class="wp-block-paragraph"><strong>Syntax: &#8211; array.forEach(function (value, index, arr) {<br>});</strong></p>



<p class="wp-block-paragraph">Where,<br>value – It is the current value of array index.<br>index – Array‟s index number<br>arr &#8211; The array object the current element belongs to</p>



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



<h2 class="wp-block-heading">for of Loop</h2>



<p class="wp-block-paragraph">The for…of statement creates a loop iterating over iterable objects.</p>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;<br>for (var variable_name of array) {<br>}</strong></p>



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



<h2 class="wp-block-heading">Input from User in Array</h2>



<p class="wp-block-paragraph"><strong>You can get input from user in an empty array:-</strong></p>



<ul class="wp-block-list"><li>var geek= [ ];</li><li>var geek = new Array( );</li><li>var geek = new Array(3); // 3 is length of array</li></ul>



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



<p class="wp-block-paragraph">Multidimensional array is Arrays of Arrays.<br>Multidimensional array can be 2D, 3D, 4D, etc.</p>



<p class="wp-block-paragraph">Ex: &#8211;<br>2D &#8211; var name[ [ ], [ ], [ ]</p>



<h2 class="wp-block-heading">Multidimensional Arra</h2>



<figure class="wp-block-table"><table><tbody><tr><td class="has-text-align-center" data-align="center">Ajay</td><td class="has-text-align-center" data-align="center">Dell</td><td class="has-text-align-center" data-align="center">10</td></tr><tr><td class="has-text-align-center" data-align="center">Vijay</td><td class="has-text-align-center" data-align="center">HP</td><td class="has-text-align-center" data-align="center">20</td></tr><tr><td class="has-text-align-center" data-align="center">Amit</td><td class="has-text-align-center" data-align="center">Lenovo</td><td class="has-text-align-center" data-align="center">30</td></tr></tbody></table></figure>



<figure class="wp-block-table"><table><tbody><tr><td>[0][0] Ajay</td><td>[0][1] Dell</td><td>[2][1] 10</td></tr><tr><td>[0][0] Vijay</td><td>[1][1] HP</td><td>[2][1] 20</td></tr><tr><td>[2[0] Amit</td><td>[2][1] Zed</td><td>[2][2] 30</td></tr></tbody></table></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-do-you-use-in-for-loops-in-javascript/">How do you use in for loops 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-in-for-loops-in-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
