From 1d3e0764fbc3d52703d830e762fc0ecf529e5c0d Mon Sep 17 00:00:00 2001 From: mrugesh mohapatra <1884376+raisedadead@users.noreply.github.com> Date: Sat, 30 Jun 2018 06:50:15 +0530 Subject: [PATCH] fix(challenge): syntax error in sample code snippet --- .gitignore | 69 +++++++++++++++++-- .../es6.json | 2 +- 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 7c9c6a9d5..874842943 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,67 @@ -node_modules +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* -dist -unpacked/ +# Runtime data +pids +*.pid +*.seed +*.pid.lock -*.log +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' *.tgz -*.patch + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next + +# IDE +.idea +*.iml +.DS_Store +Thumbs.db diff --git a/challenges/02-javascript-algorithms-and-data-structures/es6.json b/challenges/02-javascript-algorithms-and-data-structures/es6.json index 717a51960..c2efb521b 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/es6.json +++ b/challenges/02-javascript-algorithms-and-data-structures/es6.json @@ -258,7 +258,7 @@ "description": [ "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\"}
", + "
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 the MATH_CONSTANTS object so that no one is able alter the value of PI, add, or delete properties ." ],