<?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>Trim &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/trim/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Array merge in JavaScript</title>
		<link>/2010/01/21/array-merge-in-javascript/</link>
		<comments>/2010/01/21/array-merge-in-javascript/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:22:28 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Computer programming]]></category>
		<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[Sorting algorithms]]></category>
		<category><![CDATA[Trim]]></category>

		<guid isPermaLink="false">/?p=852</guid>
		<description><![CDATA[What makes array to merge in JavaScript? Actually there aren’t so many array functions in JavaScript. As you know you can join, sort, etc. which methods are pretty basic. What I’d like to do is something similar to PHPs’ array_merge and than array_unique. With JavaScript that seems pretty impossible. You can merge them with the &#8230; <a href="/2010/01/21/array-merge-in-javascript/" class="more-link">Continue reading <span class="screen-reader-text">Array merge in JavaScript</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/06/14/javascript-array-pop-get-the-last-item/" rel="bookmark" title="JavaScript array.pop() &#8211; Get The Last Item">JavaScript array.pop() &#8211; Get The Last Item </a></li>
<li><a href="/2010/07/02/friday-algorithms-javascript-merge-sort/" rel="bookmark" title="Friday Algorithms: JavaScript Merge Sort">Friday Algorithms: JavaScript Merge Sort </a></li>
<li><a href="/2010/06/11/friday-algorithms-quicksort-difference-between-php-and-javascript/" rel="bookmark" title="Friday Algorithms: Quicksort &#8211; Difference Between PHP and JavaScript">Friday Algorithms: Quicksort &#8211; Difference Between PHP and JavaScript </a></li>
<li><a href="/2010/01/09/array-hint-in-javascript/" rel="bookmark" title="Array hint in JavaScript">Array hint in JavaScript </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>What makes array to merge in JavaScript?</h2>
<p>Actually there aren’t so many array functions in JavaScript. As you know you can join, sort, etc. which methods are pretty basic. What I’d like to do is something similar to PHPs’ array_merge and than array_unique.</p>
<p>With JavaScript that seems pretty impossible. You can merge them with the .concat function as in the example bellow:</p>
<blockquote>
<pre>var a = [1,2];
var b = [3,4];
a.concat(b);</pre>
</blockquote>
<p>this gives you array with four elements. But when it comes to trim all the duplicates as it’s array_unique in PHP, well that’s really impossible. You’ve to do it by yourself, and I don’t thing this is the best technique. That slows down the code and you should avoid it!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/06/14/javascript-array-pop-get-the-last-item/" rel="bookmark" title="JavaScript array.pop() &#8211; Get The Last Item">JavaScript array.pop() &#8211; Get The Last Item </a></li>
<li><a href="/2010/07/02/friday-algorithms-javascript-merge-sort/" rel="bookmark" title="Friday Algorithms: JavaScript Merge Sort">Friday Algorithms: JavaScript Merge Sort </a></li>
<li><a href="/2010/06/11/friday-algorithms-quicksort-difference-between-php-and-javascript/" rel="bookmark" title="Friday Algorithms: Quicksort &#8211; Difference Between PHP and JavaScript">Friday Algorithms: Quicksort &#8211; Difference Between PHP and JavaScript </a></li>
<li><a href="/2010/01/09/array-hint-in-javascript/" rel="bookmark" title="Array hint in JavaScript">Array hint in JavaScript </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/21/array-merge-in-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
