diff --git a/challenges/02-javascript-algorithms-and-data-structures/es6.json b/challenges/02-javascript-algorithms-and-data-structures/es6.json index 14ab3b58ac..70b2f736e2 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/es6.json +++ b/challenges/02-javascript-algorithms-and-data-structures/es6.json @@ -362,7 +362,7 @@ "
function howMany(...args) {", "The rest operator eliminates the need to check the
return \"You have passed \" + args.length + \" arguments.\";
}
console.log(howMany(0, 1, 2)); // You have passed 3 arguments
console.log(howMany(\"string\", null, [1, 2, 3], { })); // You have passed 4 arguments.
args
array and allows us to apply map()
, filter()
and reduce()
on the parameters array.",
"sum
so that is uses the rest operator and it works in the same way with any number of parameters."
+ "Modify the function sum
so that it uses the rest operator and it works in the same way with any number of parameters."
],
"challengeSeed": [
"const sum = (function() {",
@@ -665,7 +665,7 @@
"id": "587d7b8a367417b2b2512b4f",
"title": "Write Concise Object Literal Declarations Using Simple Fields",
"description": [
- "ES6 adds some nice support for easily definining object literals.",
+ "ES6 adds some nice support for easily defining object literals.",
"Consider the following code:",
"const getMousePosition = (x, y) => ({", "
x: x,
y: y
});
getMousePosition
is a simple function that returns an object containing two fields.",
@@ -779,7 +779,7 @@
"Notice the syntax we are using to invoke the getter and setter - as if they are not even functions.",
"Getters and setters are important, because they hide internal implementation details.",
"class
keyword to create a Thermostat class. The constructor accepts Farenheit temperature.",
+ "Use class
keyword to create a Thermostat class. The constructor accepts Fahrenheit temperature.",
"Now create getter
and setter
in the class, to obtain the temperature in Celsius scale.",
"Remember that C = 5/9 * (F - 32)
and F = C * 9.0 / 5 + 32
, where F is the value of temperature in Fahrenheit scale, and C is the value of the same temperature in Celsius scale",
"Note",
@@ -796,7 +796,7 @@
" return Thermostat;",
"}",
"const Thermostat = makeClass();",
- "const thermos = new Thermostat(76); // setting in Farenheit scale",
+ "const thermos = new Thermostat(76); // setting in Fahrenheit scale",
"let temp = thermos.temperature; // 24.44 in C",
"thermos.temperature = 26;",
"temp = thermos.temperature; // 26 in C"