Revision 490257 of Function.arity

  • Revision slug: Web/JavaScript/Reference/Global_Objects/Function/arity
  • Revision title: Function.arity
  • Revision id: 490257
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment cleanup

Revision Content

{{JSRef("Global_Objects", "Function")}} {{ Obsolete_header() }}

Summary

The arity property used to return the number of arguments expected by the function, however, it no longer exists and has been replaced by the {{jsxref("Function.prototype.length")}} property.

Specifications

Implemented in JavaScript 1.2. Deprecated in JavaScript 1.4.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatUnknown() }} {{ CompatNo() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatNo() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • {{jsxref("Function.prototype.length")}}

Revision Source

<div>
 {{JSRef("Global_Objects", "Function")}} {{ Obsolete_header() }}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p class="note">The arity property used to return the number of arguments expected by the function, however, it no longer exists and has been replaced by the {{jsxref("Function.prototype.length")}} property.</p>
<h2 id="Specifications">Specifications</h2>
<p>Implemented in JavaScript 1.2. Deprecated in JavaScript 1.4.</p>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatNo() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Chrome for Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Mobile</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatNo() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
    <td>{{ CompatUnknown() }}</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also" name="See_also">See also</h2>
<ul>
 <li>{{jsxref("Function.prototype.length")}}</li>
</ul>
Revert to this revision