<?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>Reverse ( ) Method Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/reverse-method/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/reverse-method/</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>What&#8217;s the use of the method in JavaScript?</title>
		<link>https://www.scmgalaxy.com/tutorials/whats-the-use-of-the-method-in-javascript/</link>
					<comments>https://www.scmgalaxy.com/tutorials/whats-the-use-of-the-method-in-javascript/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Thu, 05 Aug 2021 09:55:57 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Concat ( ) Method]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Join ( ) Method]]></category>
		<category><![CDATA[Method]]></category>
		<category><![CDATA[Reverse ( ) Method]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7436</guid>

					<description><![CDATA[<p>method in JavaScript Concat ( ) Method Join ( ) Method Reverse ( ) Method Slice( ) Method Splice ( [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/whats-the-use-of-the-method-in-javascript/">What&#8217;s the use of the method 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">method in JavaScript</h2>



<ul class="wp-block-list"><li><strong>Concat ( ) Method</strong></li><li><strong>Join ( ) Method</strong></li><li><strong>Reverse ( ) Method</strong></li><li><strong>Slice( ) Method</strong></li><li><strong>Splice ( ) Method</strong></li><li><strong>toString( ) Method</strong></li><li><strong>Array.isArray ( ) Method</strong></li><li><strong>IndexOf ( ) Method</strong></li><li><strong>Fill ( ) Method</strong></li><li><strong>unshift ( ) Method</strong></li><li><strong>Shift( ) Method</strong></li><li><strong>Shift( ) Method</strong></li><li><strong>pop( ) Method</strong></li><li><strong>Map ( ) Method</strong></li></ul>



<h2 class="wp-block-heading">Concat ( ) Method</h2>



<p class="wp-block-paragraph">The concat() method is used to merge two or more arrays. This method does not change<br>the existing arrays, but instead returns a new array.</p>



<p class="wp-block-paragraph"><strong>Syntax:- new_array = old_array.concat(value1, value2, value_n);<br>Syntax:- new_array = old_array1.concat(old_array2, old_array_n);</strong></p>



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



<h2 class="wp-block-heading">Join ( ) Method</h2>



<p class="wp-block-paragraph">The join() method joins the elements of an array into a string, and returns the string. The elements will be separated by a specified separator. The default separator is the comma (,).</p>



<p class="wp-block-paragraph"><strong>Syntax: &#8211; array_name.join(separator);</strong></p>



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



<h2 class="wp-block-heading">Reverse ( ) Method</h2>



<p class="wp-block-paragraph">The reverse() method reverses the order of the elements in an array.</p>



<p class="wp-block-paragraph"><strong>Syntax :- array_name.reverse( );</strong></p>



<p class="wp-block-paragraph"><strong>Ex:-</strong> dev.reverse( );</p>



<h2 class="wp-block-heading">Slice( ) Method</h2>



<p class="wp-block-paragraph">The slice( ) method returns a shallow copy of a portion of an array into a new array object selected from beginning to<br>end (end not included). The original array will not be modified.</p>



<p class="wp-block-paragraph"><strong>Syntax: &#8211; array_name.slice(start, end)</strong></p>



<p class="wp-block-paragraph"><strong>Start</strong><br>If begin is undefined, the slice begins from index 0.<br>If begin is greater than the length of the sequence, an empty array is returned.<br>A negative index can be used, indicating an offset from the end of the sequence. slice(-2) extracts the last two<br>elements in the sequence.</p>



<p class="wp-block-paragraph"><strong>End</strong><br>If end is omitted, slice extracts through the end of the sequence (arr.length).<br>If end is greater than the length of the sequence, slice extracts through to the end of the sequence (arr.length).<br>A negative index can be used, indicating an offset from the end of the sequence. slice(2,-1) extracts the third<br>element through the second-to-last element in the sequence.<br>slice extracts up to but not including end.</p>



<h2 class="wp-block-heading">Splice ( ) Method</h2>



<p class="wp-block-paragraph">The splice() method changes the contents of an array by removing existing elements and/or adding new elements. This method changes the original array.</p>



<p class="wp-block-paragraph"><strong>Syntax:- array_name.splice (start, deletecount, replacevalues);</strong></p>



<p class="wp-block-paragraph"><strong>Start – </strong>The first argument start specifies at what position to add/remove items, uses negative values to specify the position from the end of the array.</p>



<p class="wp-block-paragraph"><strong>Deletecount –</strong> The second argument deletecount, is the number of elements to delete<br>beginning with index start.</p>



<p class="wp-block-paragraph"><strong>Replacevalues –</strong> replacevalues are inserted in the place of the deleted elements. If more<br>than one separate it by a comma.</p>



<h2 class="wp-block-heading">toString( ) Method</h2>



<p class="wp-block-paragraph">The toString ( ) method returns a string containing the comma-separated values of the array. This method is invoked automatically when you print an array. It is equivalent to invoking the join ( ) method without any arguments. The<br>the returned string will separate the elements in the array with commas.</p>



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



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



<h2 class="wp-block-heading">Array.isArray ( ) Method</h2>



<p class="wp-block-paragraph">The Array.isArray() method determines whether the passed value is an Array. This function returns true if the object is an array, and false if not.</p>



<p class="wp-block-paragraph"><strong>Syntax:- Array.isArray(value);</strong></p>



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



<h2 class="wp-block-heading">IndexOf ( ) Method</h2>



<p class="wp-block-paragraph">This method allows us to easily find the occurrence of an item in an array.</p>



<ul class="wp-block-list"><li>If the item is not found, it returns -1.</li><li>The search will start at the specified position, or at the beginning if no start position is specified, and end the search at the end of the array.</li><li>If the item is present more than once, the indexOf method returns the position of the first occurrence.</li></ul>



<p class="wp-block-paragraph"><strong>Syntax: &#8211; var position = array_name.indexOf(item, start);</strong></p>



<p class="wp-block-paragraph"><strong>Ex:- var position = dev.indexOf(“Rohit”, 2);</strong></p>



<h2 class="wp-block-heading">Fill ( ) Method</h2>



<p class="wp-block-paragraph">The fill() method fills all the elements in an array with a static value.</p>



<p class="wp-block-paragraph"><strong>Syntax:- array_name.fill(value, start, end)</strong></p>



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



<h2 class="wp-block-heading">unshift ( ) Method</h2>



<p class="wp-block-paragraph">The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array.<br>This method changes the length of an array.</p>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;<br>Array_name.unshift(value1, value2, value_n);</strong></p>



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



<h2 class="wp-block-heading">Push ( ) Method</h2>



<p class="wp-block-paragraph">The push() method adds one or more elements to the end of an array and returns the new length of the array.<br>The new item will be added at the end of the array.<br>This method changes the length of the array.</p>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;<br>Array_name.push(value1, value2, value_n);</strong></p>



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



<h2 class="wp-block-heading">Shift( ) Method</h2>



<p class="wp-block-paragraph">The shift() method removes the first element from an array and returns that removed element. This method changes the length of the array.</p>



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



<p class="wp-block-paragraph"><strong>Ex: &#8211; geek.shift( );</strong></p>



<h2 class="wp-block-heading">pop( ) Method</h2>



<p class="wp-block-paragraph">The pop() method removes the last element from an array and returns that removed element. This method changes the length of the array.</p>



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



<p class="wp-block-paragraph"><strong>Ex: &#8211; geek.pop( );</strong></p>



<h2 class="wp-block-heading">Map ( ) Method</h2>



<p class="wp-block-paragraph">The map() method creates a new array with the results of calling a provided function on every element in the calling array.<br>The map() method calls the provided function once for each element in an array, in order.</p>



<p class="wp-block-paragraph">map() does not execute the function for array elements without values.<br>map() does not change the original array.</p>



<p class="wp-block-paragraph"><strong>Syntax:- array_name.map(function(currentValue, index, array)<br>     {<br>     }, thisValue</strong></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/whats-the-use-of-the-method-in-javascript/">What&#8217;s the use of the method 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/whats-the-use-of-the-method-in-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
