<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Prototype JavaScript framework - Array</title>
  <id>tag:www.prototypejs.org,2008:mephisto/api/array</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://www.prototypejs.org/feed/api/array/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.prototypejs.org/api/array" rel="alternate" type="text/html"/>
  <updated>2007-04-30T20:27:07Z</updated>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Tobie</name>
    </author>
    <id>tag:www.prototypejs.org,2007-03-10:14772</id>
    <published>2007-03-10T00:46:00Z</published>
    <updated>2007-04-30T20:27:07Z</updated>
    <category term="Array"/>
    <category term="1.5.1"/>
    <link href="http://www.prototypejs.org/api/array/tojson" rel="alternate" type="text/html"/>
    <title>toJSON</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;toJSON() -&gt; String&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a JSON string.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;toJSON() -&gt; String&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a JSON string.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
['a', {b: null}].toJSON();
//-&gt; '[&quot;a&quot;, {&quot;b&quot;: null}]'
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Christophe</name>
    </author>
    <id>tag:www.prototypejs.org,2007-01-06:12977</id>
    <published>2007-01-06T14:06:00Z</published>
    <updated>2007-01-06T14:14:15Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/toarray" rel="alternate" type="text/html"/>
    <title>toArray</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;toArray() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is just a local optimization of the mixed-in &lt;a href=&quot;/api/enumerable/toArray&quot;&gt;&lt;code&gt;toArray&lt;/code&gt;&lt;/a&gt; from &lt;a href=&quot;/api/enumerable&quot;&gt;&lt;code&gt;Enumerable&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;toArray() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is just a local optimization of the mixed-in &lt;a href=&quot;/api/enumerable/toArray&quot;&gt;&lt;code&gt;toArray&lt;/code&gt;&lt;/a&gt; from &lt;a href=&quot;/api/enumerable&quot;&gt;&lt;code&gt;Enumerable&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This version aliases to &lt;a href=&quot;clone&quot;&gt;&lt;code&gt;clone&lt;/code&gt;&lt;/a&gt;, avoiding the default iterative behavior.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Christophe</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-21:12880</id>
    <published>2006-12-21T12:01:00Z</published>
    <updated>2006-12-21T12:03:14Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/size" rel="alternate" type="text/html"/>
    <title>size</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;size() -&gt; Number&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the size of the array.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;size() -&gt; Number&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the size of the array.&lt;/p&gt;
&lt;p&gt;This is just a local optimization of the mixed-in &lt;a href=&quot;/api/enumerable/size&quot;&gt;&lt;code&gt;size&lt;/code&gt;&lt;/a&gt; method from the &lt;a href=&quot;/api/enumerable&quot;&gt;&lt;code&gt;Enumerable&lt;/code&gt;&lt;/a&gt; module, which avoids array cloning and uses the array&#8217;s native &lt;code&gt;length&lt;/code&gt; property.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Mislav</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-07:12790</id>
    <published>2006-12-07T22:54:00Z</published>
    <updated>2007-01-06T12:08:51Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/from" rel="alternate" type="text/html"/>
    <title>from</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;Array.from(iterable) -&gt; actualArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Clones an existing array or creates a new one from an array-like collection.&lt;/p&gt;

&lt;p&gt;This is an alias for the &lt;a href=&quot;/api/utility/dollar-a&quot;&gt;$A()&lt;/a&gt; method. Refer to its page for complete description and examples.&lt;/p&gt;</summary>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12780</id>
    <published>2006-12-06T22:03:00Z</published>
    <updated>2007-03-14T06:17:49Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/inspect" rel="alternate" type="text/html"/>
    <title>inspect</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;inspect() -&gt; String&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the debug-oriented string representation of an array.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;inspect() -&gt; String&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the debug-oriented string representation of an array.&lt;/p&gt;
&lt;p&gt;For more information on &lt;code&gt;inspect&lt;/code&gt; methods, see &lt;a href=&quot;/api/object/inspect&quot;&gt;&lt;code&gt;Object.inspect&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
['Apples', {good: 'yes', bad: 'no'}, 3, 34].inspect()
// -&gt; &quot;['Apples', [object Object], 3, 34]&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Note&lt;/h3&gt;

&lt;p&gt;If you want to simply join the string elements of an array, use the native &lt;code&gt;join&lt;/code&gt; method instead:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
['apples', 'bananas', 'kiwis'].join(', ')
// -&gt; 'apples, bananas, kiwis'
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12778</id>
    <published>2006-12-06T21:27:00Z</published>
    <updated>2007-01-06T12:05:09Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/clone" rel="alternate" type="text/html"/>
    <title>clone</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;clone() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a duplicate of the array, leaving the original array intact.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;clone() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a duplicate of the array, leaving the original array intact.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
  var fruits = ['Apples', 'Oranges'];
  var myFavs = fruits.clone();
  myFavs.pop();
  // fruits -&gt; ['Apples', 'Oranges']
  // myFavs -&gt; ['Apples']
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12777</id>
    <published>2006-12-06T21:22:00Z</published>
    <updated>2007-01-06T12:24:59Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/uniq" rel="alternate" type="text/html"/>
    <title>uniq</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;uniq() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Produces a duplicate-free version of an array.  If no duplicates are found, the original array is returned.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;uniq() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Produces a duplicate-free version of an array.  If no duplicates are found, the original array is returned.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
['Sam', 'Justin', 'Andrew', 'Dan', 'Sam'].uniq();
// -&gt; ['Sam', 'Justin', 'Andrew', 'Dan']

['Prototype', 'prototype'].uniq();
// -&gt; ['Prototype', 'prototype'] because String comparison is case-sensitive
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Performance considerations&lt;/h3&gt;

&lt;p&gt;On large arrays with duplicates, this method has a potentially large performance cost:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Since it does not require the array to be sorted, it has quadratic complexity.&lt;/li&gt;
&lt;li&gt;Since it relies on JavaScript&#8217;s &lt;code&gt;Array.concat&lt;/code&gt;, it will yield a new, intermediary array every time it encounters a new value (a value that wasn&#8217;t already in the result array).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More efficient implementations could be devised.  This page will get updated if such an optimization is committed.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12776</id>
    <published>2006-12-06T21:18:00Z</published>
    <updated>2006-12-14T13:24:33Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/reduce" rel="alternate" type="text/html"/>
    <title>reduce</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;reduce() -&gt; Array | singleValue&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Reduces arrays: one-element arrays are turned into their unique element, while multiple-element arrays are returned untouched.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;reduce() -&gt; Array | singleValue&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Reduces arrays: one-element arrays are turned into their unique element, while multiple-element arrays are returned untouched.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;[3].reduce();
// -&gt; 3

[3, 5].reduce();
// -&gt; [3, 5]&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12775</id>
    <published>2006-12-06T21:04:00Z</published>
    <updated>2006-12-14T13:25:05Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/reverse" rel="alternate" type="text/html"/>
    <title>reverse</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;reverse([inline = true]) -&gt; Array&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the reversed version of the array.  By default, directly reverses the original. If &lt;code&gt;inline&lt;/code&gt; is set to &lt;code&gt;false&lt;/code&gt;, uses a clone of the original array.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;reverse([inline = true]) -&gt; Array&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the reversed version of the array.  By default, directly reverses the original. If &lt;code&gt;inline&lt;/code&gt; is set to &lt;code&gt;false&lt;/code&gt;, uses a clone of the original array.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;var nums = [3, 5, 6, 1, 20];
nums.reverse(false)
// -&gt; [20, 1, 6, 5, 3]
nums
// -&gt; [3, 5, 6, 1, 20]

nums.reverse()
// -&gt; [20, 1, 6, 5, 3]
nums
// -&gt; [20, 1, 6, 5, 3]&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12774</id>
    <published>2006-12-06T20:58:00Z</published>
    <updated>2008-06-06T19:48:55Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/indexof" rel="alternate" type="text/html"/>
    <title>indexOf</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;indexOf(value) -&gt; position&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the position of the first occurrence of the argument within the array.  If the argument doesn&#8217;t exist in the array, returns -1.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;indexOf(value) -&gt; position&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the position of the first occurrence of the argument within the array.  If the argument doesn&#8217;t exist in the array, returns -1.&lt;/p&gt;
&lt;p class=&quot;notice&quot;&gt;Prior to version 1.6, Prototype&#8217;s &lt;code&gt;Array#indexOf&lt;/code&gt; checked for equivalence (&lt;code&gt;==&lt;/code&gt;) instead of identity (&lt;code&gt;===&lt;/code&gt;). This was changed in order to be compliant with emerging browser implementations of &lt;code&gt;Array#indexOf&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Minor note: this uses a plain old optimized indexing loop, so there&#8217;s no risk of extensions being detected by this method.&lt;/p&gt;

&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
[3, 5, 6, 1, 20].indexOf(1)
// -&gt; 3

[3, 5, 6, 1, 20].indexOf(90)
// -&gt; -1

// COMPATIBILITY CHANGE:
[0, false, 15].indexOf(false)
// Prototype 1.5 returns 0 (because 0 == false)
// Prototype 1.6 returns 1 (because 0 !== false)
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12773</id>
    <published>2006-12-06T20:51:00Z</published>
    <updated>2006-12-14T13:26:43Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/without" rel="alternate" type="text/html"/>
    <title>without</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;without(value...) -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Produces a new version of the array that does not contain any of the specified values.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;without(value...) -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Produces a new version of the array that does not contain any of the specified values.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;[3, 5, 6, 1, 20].without(3)
// -&gt; [5, 6, 1, 20]

[3, 5, 6, 1, 20].without(20, 6)
// -&gt; [3, 5, 1]&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12771</id>
    <published>2006-12-06T20:38:00Z</published>
    <updated>2006-12-14T13:21:19Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/flatten" rel="alternate" type="text/html"/>
    <title>flatten</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;flatten() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a &#8220;flat&#8221; (one-dimensional) version of the array.  Nested arrays are recursively injected &#8220;inline.&#8221;  This can prove very useful when handling the results of a recursive collection algorithm, for instance.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;flatten() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a &#8220;flat&#8221; (one-dimensional) version of the array.  Nested arrays are recursively injected &#8220;inline.&#8221;  This can prove very useful when handling the results of a recursive collection algorithm, for instance.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;['frank', ['bob', 'lisa'], ['jill', ['tom', 'sally']]].flatten()
// -&gt; ['frank', 'bob', 'lisa', 'jill', 'tom', 'sally']&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12770</id>
    <published>2006-12-06T20:33:00Z</published>
    <updated>2006-12-14T13:19:34Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/compact" rel="alternate" type="text/html"/>
    <title>compact</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;compact() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a new version of the array, without any &lt;code&gt;null&lt;/code&gt;/&lt;code&gt;undefined&lt;/code&gt; values.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;compact() -&gt; newArray&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns a new version of the array, without any &lt;code&gt;null&lt;/code&gt;/&lt;code&gt;undefined&lt;/code&gt; values.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;['frank', , 'sue', , 'sally', null].compact()
// -&gt; ['frank', 'sue', 'sally']&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12769</id>
    <published>2006-12-06T20:32:00Z</published>
    <updated>2006-12-14T13:23:46Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/last" rel="alternate" type="text/html"/>
    <title>last</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;last() -&gt; value&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the last item in the array, or &lt;code&gt;undefined&lt;/code&gt; if the array is empty.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;last() -&gt; value&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the last item in the array, or &lt;code&gt;undefined&lt;/code&gt; if the array is empty.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;['Ruby', 'Php', 'Python'].last()
// -&gt; 'Python'

[].last()
// -&gt; undefined&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://www.prototypejs.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.prototypejs.org,2006-12-06:12768</id>
    <published>2006-12-06T20:30:00Z</published>
    <updated>2006-12-14T13:20:43Z</updated>
    <category term="Array"/>
    <link href="http://www.prototypejs.org/api/array/first" rel="alternate" type="text/html"/>
    <title>first</title>
<summary type="html">&lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;first() -&gt; value&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the first item in the array, or &lt;code&gt;undefined&lt;/code&gt; if the array is empty.&lt;/p&gt;</summary><content type="html">
            &lt;pre&gt;&lt;code class=&quot;ebnf&quot;&gt;first() -&gt; value&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Returns the first item in the array, or &lt;code&gt;undefined&lt;/code&gt; if the array is empty.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;['Ruby', 'Php', 'Python'].first()
// -&gt; 'Ruby'

[].first()
// -&gt; undefined&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
</feed>
