From e10a9fcda02e1fdbfc8a212118101f5f5c32a37f Mon Sep 17 00:00:00 2001 From: Todd Bradshaw Date: Tue, 12 Jun 2018 08:18:58 -0500 Subject: [PATCH] fixed line breaks in 'Prevent Object Mutation' challenge (#17547) * fix(seed):line breaks in 'Prevent Object Mutation' challenge #17541 * Update es6.json --- .../02-javascript-algorithms-and-data-structures/es6.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json b/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json index 5d45abf560..eeef6e5f6b 100644 --- a/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json +++ b/seed/challenges/02-javascript-algorithms-and-data-structures/es6.json @@ -237,11 +237,11 @@ "id": "598f48a36c8c40764b4e52b3", "title": "Prevent Object Mutation", "description": [ - "As seen in previous challenge, const declaration alone doesn't really protect your data from mutation. To ensure your data doesn't change, JavaScript provides a function Object.freeze to prevent data mutation.", - "Once the object is freezed, you can no longer add/update/delete properties from it. Any attempt at changing the object will be rejected without any error.", - "
\nlet obj = {\n name:\"FreeCodeCamp\"\n review:\"Awesome\"\n};\nObject.freeze(obj);\nobj.review = \"bad\"; //will be ignored. Mutation not allowed\nobj.newProp = \"Test\"; // will be ignored. Mutation not allowed\nconsole.log(obj); \n// { name: \"FreeCodeCamp\", review:\"Awesome\"}\n
", + "As seen in the previous challenge, const declaration alone doesn't really protect your data from mutation. To ensure your data doesn't change, JavaScript provides a function Object.freeze to prevent data mutation.", + "Once the object is frozen, you can no longer add, update, or delete properties from it. Any attempt at changing the object will be rejected without an error.", + "

let obj = {
name:\"FreeCodeCamp\"
review:\"Awesome\"
};
Object.freeze(obj);
obj.review = \"bad\"; //will be ignored. Mutation not allowed
obj.newProp = \"Test\"; // will be ignored. Mutation not allowed
console.log(obj);
// { name: \"FreeCodeCamp\", review:\"Awesome\"}
", "
", - "In this challenge you are going to use Object.freeze to prevent mathematical constants from changing. You need to freeze MATH_CONSTANTS object so that noone is able alter the value of PI or add any more properties to it." + "In this challenge you are going to use Object.freeze to prevent mathematical constants from changing. You need to freeze the MATH_CONSTANTS object so that no one is able alter the value of PI, add, or delete properties ." ], "tests": [ {