aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/objets_globaux/object/count/index.html
blob: 03dfa86bde889034e61406718fffd2296f8a319d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: Object.prototype.__count__
slug: Web/JavaScript/Reference/Objets_globaux/Object/count
tags:
  - JavaScript
  - Object
  - Obsolete
  - Propriété
  - Prototype
  - Reference
translation_of: Archive/Web/JavaScript/Object.count
---
<div>{{JSRef}}{{Non-standard_Header}}{{obsolete_header("gecko2")}}</div>

<p>La propriété <strong><code>__count__</code></strong> était utilisée pour compter les propriétés énumérables d'un objet mais a été retiréee.</p>

<h2 id="Syntaxe">Syntaxe</h2>

<pre class="syntaxbox"><var>obj</var>.__count__</pre>

<h2 id="Exemples">Exemples</h2>

<pre class="brush: js">{ 1: 1 }.__count__              // 1
[].__count__                    // 0
[1].__count__                   // 1
[1, /* trou */, 2, 3].__count__ // 3</pre>

<h2 id="Spécifications">Spécifications</h2>

<p>Cette propriété n'appartient à aucune spécification.</p>

<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>

<div class="hidden">Le tableau de compatibilité de cette page a été généré à partir de données structurées. Si vous souhaitez contribuer à ces données, n'hésitez pas à consulter <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> et à nous envoyer une <em>pull request</em>.</div>

<p>{{Compat("javascript.builtins.Object.count")}}</p>

<h2 id="Voir_aussi">Voir aussi</h2>

<ul>
 <li><a class="external" href="http://whereswalden.com/2010/04/06/more-changes-coming-to-spidermonkey-the-magical-__count__-property-of-objects-is-being-removed/">[Billet de blog] More changes coming to SpiderMonkey: the magical __count__ property is being removed</a> (en anglais)</li>
</ul>