A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf below:

Object.getPrototypeOf() - JavaScript | MDN

Object.getPrototypeOf()

Baseline Widely available

Resumen

El método Object.getPrototypeOf() devuelve el prototipo (es decir, el valor de la propiedad interna [[Prototype]]) del objeto especificado.

Sintaxis
Object.getPrototypeOf(obj)
Parámetros
obj

El objeto cuyo prototipo va a ser devuelto.

Valor Devuelto

El prototipo del objeto dado. Si no existen propiedades heredadas se devolverá null.

Ejemplos
var proto = {};
var obj = Object.create(proto);
Object.getPrototypeOf(obj) === proto; // true
Notas

En ES5, lanzará una excepción TypeError si el parámetro obj no es un objeto. en ES6, El parámetro será forzado a un Object.

> Object.getPrototypeOf('foo')
TypeError: "foo" is not an object  // ES5 code
> Object.getPrototypeOf('foo')
String.prototype                   // ES6 code
Especificaciones Compatibilidad con navegadores Mira también

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4