You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-6Lines changed: 56 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -618,9 +618,11 @@ function Familia(numeroDeIntegrantes,mascotas){
618
618
constructor(var_a,var_b,'etc.')
619
619
{
620
620
this.var_a='variable';
621
+
/*
621
622
.
623
+
. Variables que se necesiten
622
624
.
623
-
.
625
+
*/
624
626
this.nombre_variable='variable';
625
627
}
626
628
@@ -650,13 +652,13 @@ function Familia(numeroDeIntegrantes,mascotas){
650
652
}
651
653
652
654
acercaFamilia(){
653
-
return`La calle es ${calle} y el numero es ${numero}. El numero de integrantes en la familia es ${numeroDeIntegrantes} y tienen ${mascotas} mascotas.`
655
+
return`La calle es ${this.calle} y el numero es ${this.numero}. El numero de integrantes en la familia es ${this.numeroDeIntegrantes} y tienen ${this.mascotas} mascotas.`
654
656
}
655
657
656
-
tipoCasa(){
657
-
if(casa ===1){
658
+
tipoCasa(casa){
659
+
if(this.casa===1){
658
660
return'Unifamiliar';
659
-
} elseif(casa ===2){
661
+
} elseif(this.casa===2){
660
662
return'Duplex';
661
663
}else{
662
664
return'Departamento';
@@ -668,7 +670,55 @@ function Familia(numeroDeIntegrantes,mascotas){
668
670
669
671
console.log(familia_A)
670
672
```
673
+
### Consola (Google Chrome)
671
674
672
675

673
676
674
-

677
+
>Llamando a las funciones
678
+

679
+

680
+
681
+
>### Class / Extends
682
+
> Utilizar el extendes despues de declarar una clase esta "extendera" sus atributos tomando la clase que le indiques
return`La calle es ${this.calle} y el numero es ${this.numero}. El numero de integrantes en la familia es ${this.numeroDeIntegrantes} y tienen ${this.mascotas} mascotas.`
0 commit comments