Professional Documents
Culture Documents
OBJETOS en JAVASCRIPT
La creacin de un objeto se hace con una funcin (), que ser la constructora, y a la vez la que identifique el objeto.
Hay dos formas de definir la funcin constructora: o Definir una funcin o Definir una variable cuyo contenido sea una funcin
var Gato = function (nombre, color, edad) { this.nombre = nombre; this.color = color; this.edad = edad; }
[...]
this.comer = comerExterna; [...]
EJERCICIOS JAVASCRIPT
EJERCICIO 01
EJERCICIO 02
EJERCICIO 02
EJERCICIO 02
EJERCICIO 03
EJERCICIO 03
EJERCICIO 04
EJERCICIO 04
EJERCICIOS
PHP
EJERCICIO 11
EJERCICIO 12
EJERCICIO 13
SOLUCIN