diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md index 9c858a5c4b..6a7aed09f3 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md @@ -57,7 +57,6 @@ tests: ```js function myLocalScope() { - 'use strict'; // Only change code below this line @@ -81,7 +80,6 @@ console.log('outside myLocalScope', myVar); ```js function myLocalScope() { - 'use strict'; // Only change code below this line var myVar; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md index 1beaf7d615..5cb7c08f20 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md @@ -54,7 +54,6 @@ console.log(printNumTwo()); As you can see, printNumTwo() prints 3 and not 2. This is because the value assigned to i was updated and the printNumTwo() returns the global i and not the value i had when the function was created in the for loop. The let keyword does not follow this behavior: ```js -'use strict'; let printNumTwo; for (let i = 0; i < 3; i++) { if (i === 2) { @@ -101,7 +100,6 @@ tests: ```js function checkScope() { - 'use strict'; var i = 'function scope'; if (true) { i = 'block scope'; @@ -123,7 +121,6 @@ function checkScope() { ```js function checkScope() { - 'use strict'; let i = 'function scope'; if (true) { let i = 'block scope'; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/declare-a-read-only-variable-with-the-const-keyword.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/declare-a-read-only-variable-with-the-const-keyword.md index 480727ea24..c127d57b5f 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/declare-a-read-only-variable-with-the-const-keyword.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/declare-a-read-only-variable-with-the-const-keyword.md @@ -11,7 +11,6 @@ The keyword let is not the only new way to declare variables. In ES const has all the awesome features that let has, with the added bonus that variables declared using const are read-only. They are a constant value, which means that once a variable is assigned with const, it cannot be reassigned. ```js -"use strict"; const FAV_PET = "Cats"; FAV_PET = "Dogs"; // returns error ``` @@ -51,7 +50,6 @@ tests: ```js function printManyTimes(str) { - "use strict"; // Only change code below this line @@ -77,7 +75,6 @@ printManyTimes("freeCodeCamp"); ```js function printManyTimes(str) { - "use strict"; const SENTENCE = str + " is cool!"; for (let i = 0; i < str.length; i+=2) { diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.md index 010b765df6..679a285acd 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.md @@ -12,7 +12,6 @@ Some developers prefer to assign all their variables using const by However, it is important to understand that objects (including arrays and functions) assigned to a variable using const are still mutable. Using the const declaration only prevents reassignment of the variable identifier. ```js -"use strict"; const s = [5, 6, 7]; s = [1, 2, 3]; // throws error, trying to assign a const s[2] = 45; // works just as it would with an array declared with var or let @@ -53,7 +52,6 @@ tests: ```js const s = [5, 7, 2]; function editInPlace() { - 'use strict'; // Only change code below this line // Using s = [2, 5, 7] would be invalid @@ -75,7 +73,6 @@ editInPlace(); ```js const s = [5, 7, 2]; function editInPlace() { - 'use strict'; s[0] = 2; s[1] = 5; s[2] = 7; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/prevent-object-mutation.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/prevent-object-mutation.md index 36e338107a..7eece62244 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/prevent-object-mutation.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/prevent-object-mutation.md @@ -54,7 +54,6 @@ tests: ```js function freezeObj() { - 'use strict'; const MATH_CONSTANTS = { PI: 3.14 }; @@ -83,7 +82,6 @@ const PI = freezeObj(); ```js function freezeObj() { - 'use strict'; const MATH_CONSTANTS = { PI: 3.14 }; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md index ac8fb73490..61a5cc5a26 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md @@ -67,7 +67,6 @@ tests: ```js var magic = function() { - "use strict"; return new Date(); }; ``` @@ -83,7 +82,6 @@ var magic = function() { ```js const magic = () => { - "use strict"; return new Date(); }; ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md index 6d891165e6..7eaec45eb6 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md @@ -51,7 +51,6 @@ tests: ```js const source = [1,2,3,4,5,6,7,8,9,10]; function removeFirstTwo(list) { - "use strict"; // Only change code below this line const arr = list; // Change this line // Only change code above this line @@ -73,7 +72,6 @@ const arr = removeFirstTwo(source); ```js const source = [1,2,3,4,5,6,7,8,9,10]; function removeFirstTwo(list) { - "use strict"; const [, , ...arr] = list; return arr; } diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md index 782d18851e..dfdd36289e 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md @@ -64,7 +64,6 @@ tests: ```js var myConcat = function(arr1, arr2) { - "use strict"; return arr1.concat(arr2); }; @@ -82,7 +81,6 @@ console.log(myConcat([1, 2], [3, 4, 5])); ```js const myConcat = (arr1, arr2) => { - "use strict"; return arr1.concat(arr2); }; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.md index 9234dbbcaf..93c716aff9 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.md @@ -53,7 +53,6 @@ tests: ```js const createPerson = (name, age, gender) => { - "use strict"; // Only change code below this line return { name: name, @@ -75,7 +74,6 @@ const createPerson = (name, age, gender) => { ```js const createPerson = (name, age, gender) => { - "use strict"; return { name, age,