The JavaScript Function class inherits from the Object class (this demonstrates specialization of the model) and the Function.prototype property is an instance of Object (this demonstrates composition).
La clase Function de JavaScript hereda de la clase de Object (esto demuestra la especialización del modelo) y la propiedad Function.prototype es un ejemplo de Objeto (esto demuestra la composición)
Object prototypes Prototypes are the mechanism by which JavaScript objects inherit features from one another, and they work differently to inheritance mechanisms in classical object-oriented programming languages.
Los prototipos son el mecanismo por el cual los objetos en JavaScript heredan características entre si, y funcionan de manera distinta a los mecanismos de herencia de los lenguajes de programación orientada a objetos clásicos.
While it is possible to modify the Object prototype, it is generally considered bad practice because most objects in JavaScript will inherit methods and properties from the Object prototype and they may not expect the prototype to be modified.
Aunque esto sea posible se considera una mala práctica modificar el prototipo de Object ya que la mayoría de los objetos en Javascript heredan los métodos y propiedades del objeto prototype, objetos los cuales pueden esperar que estos no hayan sido modificados.
At this point you should understand JavaScript object and OOP basics, prototypes and prototypal inheritance, how to create classes (constructors) and object instances, add features to classes, and create subclasses that inherit from other classes.
En este punto debe entender los conceptos básicos de objetos JavaScript y POO, prototipos y herencia de prototipos, cómo crear clases (constructores) e instancias de objetos, añadir características a las clases y crear subclases que heredan de otras clases.
To define a hub, we only need a class that inherits from the Hub class and SignalR will do the rest. It will discover (by using reflection) all the different hubs in the current assembly and generate the corresponding javascript.
Para definir un hub, solamente necesitamos una clase que herede de la clase Hub y SignalR hará el resto, es decir, descubrir los diferentes hubs y exponerlos al cliente.
A natural child can inherit from both parents, depending on the laws.
Un hijo natural puede heredar de ambos padres, dependiendo de las leyes.
They were not entitled to inherit from their parents or husbands.
No tenía derecho a heredar de sus padres ni de su esposo.
That's the smile our kid is going to inherit from you.
Esa es la sonrisa que nuestro hijo va a heredar de ti.
Better hope you inherit from this half of the gene pool.
Mejor espero que heredes de esto la mitad de los genes.
He had a comfortable life thanks to an inherit from their parents.
Él tenía una vida confortable gracias a la herencia de sus padres.
Contenido potencialmente sensible o inapropiado
Los ejemplos se utilizan solo para ayudarte a traducir la palabra o expresión en diversos contextos. Nosotros no los seleccionamos ni los validamos y pueden contener términos o ideas inapropiados. Infórmanos sobre este tipo de ejemplos para que sean editados o dejen de mostrarse. Las traduccciones potencialmente sensibles, inapropiadas o coloquiales suelen estar marcadas con rojo o con naranja.