<?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>js &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/tag/js/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Tue, 24 Aug 2021 13:00:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Array map() Method In JavaScript</title>
		<link>https://www.bestdevops.com/array-map-method-in-javascript/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Tue, 24 Aug 2021 13:00:20 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[es6]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[map]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19692</guid>

					<description><![CDATA[The map() method in JavaScript creates an array by calling a specific function on each element present in the parent array. It [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">The <strong>map()</strong> method in JavaScript creates an array by calling a specific function on each element present in the parent array. It is a non-mutating method. Generally <strong>map()</strong> method is used to iterate over an array and calling function on every element of array.</h3>



<h3 class="wp-block-heading"><br><strong>Syntax:</strong></h3>



<pre class="wp-block-preformatted">array.map(function(currentValue, index, arr), thisValue)</pre>



<p class="wp-block-paragraph"><strong>Parameters:</strong>&nbsp;This method accepts two parameters as mentioned above and described below:</p>



<ul class="wp-block-list"><li><strong>function(currentValue, index, arr):</strong>&nbsp;It is required parameter and it runs on each element of array. It contains three parameters which are listed below:<ul><li><strong>currentValue:</strong>&nbsp;It is required parameter and it holds the value of current element.</li><li><strong>index:</strong>&nbsp;It is optional parameter and it holds the index of current element.</li><li><strong>arr:</strong>&nbsp;It is optional parameter and it holds the array.</li></ul></li><li><strong>thisValue:</strong>&nbsp;It is optional parameter and used to hold the value of passed to the function.</li></ul>



<p class="wp-block-paragraph"><strong>Return Value:</strong>&nbsp;It returns a new array and elements of arrays are result of callback function.</p>



<p class="wp-block-paragraph">Below examples illustrate the use of array map() method in JavaScript:<br><strong>Example 1:</strong> This example use array map() method and return the square of array element.</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"><strong>Output:</strong><br><img fetchpriority="high" decoding="async" width="300" height="248" src="https://media.geeksforgeeks.org/wp-content/uploads/20190306001953/map1-300x248.jpg" alt=""></p>



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



<figure class="wp-block-image size-large"><img decoding="async" width="1369" height="750" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-121-edited.png" alt="" class="wp-image-19694" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-121-edited.png 1369w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-121-edited-300x164.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-121-edited-1024x561.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-121-edited-768x421.png 768w" sizes="(max-width: 1369px) 100vw, 1369px" /></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What are Rest parameters in JavaScript ?</title>
		<link>https://www.bestdevops.com/what-are-rest-parameters-in-javascript/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Tue, 24 Aug 2021 11:47:47 +0000</pubDate>
				<category><![CDATA[Feature Driven Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[Rest Parameter]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19675</guid>

					<description><![CDATA[The&#160;rest parameter&#160;syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent&#160;variadic [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading">The&nbsp;<strong>rest parameter</strong>&nbsp;syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent&nbsp;variadic functions&nbsp;in JavaScript.</h3>



<h2 class="wp-block-heading">Now, What is variadic function ?</h2>



<p class="wp-block-paragraph">In&nbsp;mathematics&nbsp;and in&nbsp;computer programming, a&nbsp;<strong>variadic function</strong>&nbsp;is a&nbsp;function&nbsp;of indefinite&nbsp;arity, i.e., one which accepts a variable number of&nbsp;arguments. Support for variadic functions differs widely among&nbsp;programming languages.</p>



<h2 class="wp-block-heading" id="description">What is Rest parameter</h2>



<p class="wp-block-paragraph">A function definition&#8217;s last parameter can be prefixed with &#8220;<code>...</code>&#8221; , which will cause all remaining (user supplied) parameters to be placed within a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">&#8220;standard&#8221; JavaScript array.</a>. Only the last parameter in a function definition can be a rest parameter.</p>



<h2 class="wp-block-heading"><strong>JavaScript Demo: Functions Rest Parameters</strong></h2>



<figure class="wp-block-image size-full is-resized"><img decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-120.png" alt="" class="wp-image-19676" width="674" height="385" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-120.png 782w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-120-300x171.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-120-768x439.png 768w" sizes="(max-width: 674px) 100vw, 674px" /></figure>



<script src="https://gist.github.com/pradeeprjth/6d71fdd68dc96e4c50cecbb9e7b157a9.js"></script>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
