We konden deze vermelding niet vinden. Er worden benaderende resultaten weergegeven. Controleer je spelling of stel voor deze term aan het woordenboek toe te voegen.
hasOwnProperty
Tout objet a une méthode appelée hasOwnProperty, qui nous indique si l'objet a une propriété de ce nom.
Every object has a method called hasOwnProperty, which tells us whether the object has a property with a given name.
La méthode hasOwnProperty() retourne un booléen indiquant si l'objet possède la propriété spécifiée.
The hasOwnProperty() method returns a boolean indicating whether the object has the specified property.
hasOwnProperty peut également être utilisée dans les situations où l'on utilise l'opérateur in pour savoir si un objet contient une propriété particulière.
hasOwnProperty can also be used in those situations where we have been using the in operator to see whether an object has a specific property.
Afin de vérifier si un objet dispose d'une propriété qui lui est propre et qui n'est pas plus haut dans la chaîne, il est nécessaire d'utiliser la méthode hasOwnProperty, dont tous les objets héritent grâce à Object.prototype.
To check whether an object has a property defined on itself and not somewhere on its prototype chain, it is necessary to use the hasOwnProperty method which all objects inherit from Object.prototype.
hasOwnProperty est le seul élément JavaScript qui est liée aux propriétés et qui ne parcourt pas la chaîne de prototypes.
hasOwnProperty is the only thing in JavaScript which deals with properties and does not traverse the prototype chain.
Chaque objet descendant d'Object hérite de la méthode hasOwnProperty.
All descendents of Object inherit the hasOwnProperty method.
Exemples Utiliser hasOwnProperty pour tester l'existence d'une propriété
Examples Using hasOwnProperty to test for a property's existence
Evalue la chaîne du code JavaScript dans le contexte de l'objet spécifié. hasOwnProperty
Evaluates a string of JavaScript code in the context of the specified object. hasOwnProperty
Utiliser hasOwnProperty pour tester l'existence d'une propriété
Cette boucle ressemble à la première mais ajoute la méthode hasOwnProperty() qui permet de vérifier si la propriété énumérable recensée est directement disponible sur l'objet (c'est-à-dire si elle n'est pas héritée).
This loop is similar to the first one, but it uses hasOwnProperty() to check, if the found enumerable property is object's own (not inherited). And if it is, the property is logged.
Chaque objet descendant d'Object hérite de la méthode hasOwnProperty. Cette méthode peut être utilisée pour déterminer si un objet a la propriété spécifiée en tant que propriété directe de cet objet.
This method can be used to determine whether an object has the specified property as a direct property of that object; unlike the in operator, this method does not check down the object's prototype chain.
Potentieel gevoelige of ongepaste informatie
Er worden alleen voorbeelden gegeven om u te helpen het woord of de woordcombinatie waarop u hebt gezocht, te vertalen. Deze worden niet door ons geselecteerd of gevalideerd en kunnen ongepaste taal bevatten. Wij vragen u melding te maken van voorbeelden die dienen te worden aangepast of verwijderd. Vertalingen met grof of informeel taalgebruik worden meestal rood of oranje gemarkeerd.