From 07e8b3b0aa24d80cf0043e5bc0fdadb9828ac28d Mon Sep 17 00:00:00 2001 From: ladybugtju Date: Tue, 12 Jul 2016 10:48:21 -0700 Subject: [PATCH] Changed number of car seats to 5 --- .../object-oriented-and-functional-programming.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/seed/challenges/01-front-end-development-certification/object-oriented-and-functional-programming.json b/seed/challenges/01-front-end-development-certification/object-oriented-and-functional-programming.json index d92b5b8a93e..6493285406c 100644 --- a/seed/challenges/01-front-end-development-certification/object-oriented-and-functional-programming.json +++ b/seed/challenges/01-front-end-development-certification/object-oriented-and-functional-programming.json @@ -100,7 +100,7 @@ "var Carro = function() {", "& nbsp; & nbsp; this.llantas = 4; ", "& nbsp; & nbsp; this.motores = 1; ", - "& nbsp; & nbsp; this.asientos = 1; ", + "& nbsp; & nbsp; this.asientos = 5; ", "}; ", "En una constructora la variable this hace referencia al nuevo objeto que está siendo creado por la constructora. Así que cuando escribimos ", "  this.llantas = 4;", @@ -117,7 +117,7 @@ "To use a constructor function we call it with the new keyword in front of it like:", "var myCar = new Car();", "myCar is now an instance of the Car constructor that looks like the object it described:", - "
{
  wheels: 4,
  engines: 1,
  seats: 1
}
", + "
{
  wheels: 4,
  engines: 1,
  seats: 5
}
", "Note that it is important to use the new keyword when calling a constructor. This is how Javascript knows to create a new object and that all the references to this inside the constructor should be referring to this new object.", "Now, once the myCar instance is created it can be used like any other object and can have its properties accessed and modified the same way you would usually. For example:", "myCar.turboType = \"twin\";", @@ -129,7 +129,7 @@ "var Car = function() {", " this.wheels = 4;", " this.engines = 1;", - " this.seats = 1;", + " this.seats = 5;", "};", "", "// Only change code below this line.", @@ -140,7 +140,7 @@ "(function() {return JSON.stringify(myCar);})();" ], "solutions": [ - "var Car = function() {\n this.wheels = 4;\n this.engines = 1;\n this.seats = 1;\n};\n\nvar myCar = new Car();\n\nmyCar.nickname = \"Lucy\";" + "var Car = function() {\n this.wheels = 4;\n this.engines = 1;\n this.seats = 5;\n};\n\nvar myCar = new Car();\n\nmyCar.nickname = \"Lucy\";" ], "tests": [ "assert((new Car()).wheels === 4, 'message: The property wheels should still be 4 in the object constructor.');", @@ -159,7 +159,7 @@ "{", "  wheels: 4,", "  engines: 1,", - "  seats: 1", + "  seats: 5", "}", "Ten en cuenta que es importante utilizar la palabra reservada new cuando se llama a una constructora. Así es como Javascript sabe crear un objeto nuevo y hace que todas las referencias a this dentro del constructor se refieran al objeto nuevo ", "Ahora, una vez que la instancia miCarro se crea, puede ser utilizada como cualquier otro objeto y puedes acceder o modificar sus propiedades como lo harías normalmente. Por ejemplo:", @@ -187,7 +187,7 @@ "var Car = function() {", " //Change this constructor", " this.wheels = 4;", - " this.seats = 1;", + " this.seats = 5;", " this.engines = 1;", "};", "",