From 3a9251d55eff2986afe07d2ec789485aba0311fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Boisseau-Sierra?= Date: Fri, 8 Jun 2018 20:44:45 -0400 Subject: [PATCH] Transform 'var' in 'let' --- caesar/caesar.js | 2 +- caesar/caesar.spec.js | 2 +- calculator/calculator.spec.js | 2 +- fibonacci/fibonacci.js | 2 +- fibonacci/fibonacci.spec.js | 2 +- generator-exercise/generators/app/templates/title.js | 2 +- generator-exercise/generators/app/templates/title.spec.js | 2 +- helloWorld/README.md | 6 +++--- helloWorld/helloWorld.js | 4 ++-- helloWorld/helloWorld.spec.js | 2 +- leapYears/leapYears.js | 2 +- leapYears/leapYears.spec.js | 2 +- palindromes/palindromes.js | 2 +- palindromes/palindromes.spec.js | 2 +- pig_latin/pigLatin.spec.js | 2 +- removeFromArray/removeFromArray.js | 2 +- removeFromArray/removeFromArray.spec.js | 2 +- repeatString/repeatString.js | 2 +- repeatString/repeatString.spec.js | 2 +- reverseString/reverseString.js | 2 +- reverseString/reverseString.spec.js | 2 +- snakeCase/snakeCase.js | 2 +- snakeCase/snakeCase.spec.js | 2 +- sumAll/sumAll.js | 2 +- sumAll/sumAll.spec.js | 2 +- tempConversion/tempConversion.js | 4 ++-- tempConversion/tempConversion.spec.js | 2 +- 27 files changed, 31 insertions(+), 31 deletions(-) diff --git a/caesar/caesar.js b/caesar/caesar.js index 42bc82b..6096f24 100644 --- a/caesar/caesar.js +++ b/caesar/caesar.js @@ -1,4 +1,4 @@ -var caesar = function() { +let caesar = function() { } diff --git a/caesar/caesar.spec.js b/caesar/caesar.spec.js index 8f3468c..5432e6e 100644 --- a/caesar/caesar.spec.js +++ b/caesar/caesar.spec.js @@ -1,4 +1,4 @@ -var caesar = require('./caesar') +let caesar = require('./caesar') describe('caesar', function() { it('works with single letters', function() { diff --git a/calculator/calculator.spec.js b/calculator/calculator.spec.js index 7a8bc3c..859266d 100644 --- a/calculator/calculator.spec.js +++ b/calculator/calculator.spec.js @@ -1,4 +1,4 @@ -var calculator = require ('./calculator.js'); +let calculator = require ('./calculator.js'); describe('add', function() { it('adds 0 and 0', function() { diff --git a/fibonacci/fibonacci.js b/fibonacci/fibonacci.js index 65b28bb..f93a757 100644 --- a/fibonacci/fibonacci.js +++ b/fibonacci/fibonacci.js @@ -1,4 +1,4 @@ -var fibonacci = function() { +let fibonacci = function() { } diff --git a/fibonacci/fibonacci.spec.js b/fibonacci/fibonacci.spec.js index 956e418..26a6a5d 100644 --- a/fibonacci/fibonacci.spec.js +++ b/fibonacci/fibonacci.spec.js @@ -1,4 +1,4 @@ -var fibonacci = require('./fibonacci') +let fibonacci = require('./fibonacci') describe('fibonacci', function() { it('works', function() { diff --git a/generator-exercise/generators/app/templates/title.js b/generator-exercise/generators/app/templates/title.js index baedf2c..34030c5 100644 --- a/generator-exercise/generators/app/templates/title.js +++ b/generator-exercise/generators/app/templates/title.js @@ -1,4 +1,4 @@ -var <%= title %> = function() { +let <%= title %> = function() { } diff --git a/generator-exercise/generators/app/templates/title.spec.js b/generator-exercise/generators/app/templates/title.spec.js index 7db94cc..fa4ce97 100644 --- a/generator-exercise/generators/app/templates/title.spec.js +++ b/generator-exercise/generators/app/templates/title.spec.js @@ -1,4 +1,4 @@ -var <%= title %> = require('./<%=title%>') +let <%= title %> = require('./<%=title%>') describe('<%=title%>', function() { it('EDITME', function() { diff --git a/helloWorld/README.md b/helloWorld/README.md index 2a51d18..6832799 100644 --- a/helloWorld/README.md +++ b/helloWorld/README.md @@ -10,7 +10,7 @@ This setup should be the same for all of the exercises. The plain javascript fi Let's look at the spec file first: ```javascript -var helloWorld = require('./helloWorld'); +let helloWorld = require('./helloWorld'); describe('Hello World', function() { it('says hello world', function() { @@ -26,7 +26,7 @@ For now you do not need to worry about how to write tests, but you should try to so let's look at the javascript file: ```javascript -var helloWorld = function() { +let helloWorld = function() { return '' } @@ -40,7 +40,7 @@ Just to make sure, in case you're confused at this point, the test is telling yo this is what the final function should look like: ```javascript -var helloWorld = function() { +let helloWorld = function() { return 'Hello, World!' } diff --git a/helloWorld/helloWorld.js b/helloWorld/helloWorld.js index cf8cd75..38bd3ee 100644 --- a/helloWorld/helloWorld.js +++ b/helloWorld/helloWorld.js @@ -1,5 +1,5 @@ -var helloWorld = function() { +let helloWorld = function() { return '' } -module.exports = helloWorld \ No newline at end of file +module.exports = helloWorld diff --git a/helloWorld/helloWorld.spec.js b/helloWorld/helloWorld.spec.js index bb79262..df66165 100644 --- a/helloWorld/helloWorld.spec.js +++ b/helloWorld/helloWorld.spec.js @@ -1,4 +1,4 @@ -var helloWorld = require('./helloWorld'); +let helloWorld = require('./helloWorld'); describe('Hello World', function() { it('says hello world', function() { diff --git a/leapYears/leapYears.js b/leapYears/leapYears.js index 7884b78..1a130cd 100644 --- a/leapYears/leapYears.js +++ b/leapYears/leapYears.js @@ -1,4 +1,4 @@ -var leapYears = function() { +let leapYears = function() { } diff --git a/leapYears/leapYears.spec.js b/leapYears/leapYears.spec.js index b58dadb..18449bc 100644 --- a/leapYears/leapYears.spec.js +++ b/leapYears/leapYears.spec.js @@ -1,4 +1,4 @@ -var leapYears = require('./leapYears') +let leapYears = require('./leapYears') describe('leapYears', function() { it('works with non century years', function() { diff --git a/palindromes/palindromes.js b/palindromes/palindromes.js index a27496d..8e715b2 100644 --- a/palindromes/palindromes.js +++ b/palindromes/palindromes.js @@ -1,4 +1,4 @@ -var palindromes = function() { +let palindromes = function() { } diff --git a/palindromes/palindromes.spec.js b/palindromes/palindromes.spec.js index e5e594d..d3815d8 100644 --- a/palindromes/palindromes.spec.js +++ b/palindromes/palindromes.spec.js @@ -1,4 +1,4 @@ -var palindromes = require('./palindromes') +let palindromes = require('./palindromes') describe('palindromes', function() { it('works with single words', function() { diff --git a/pig_latin/pigLatin.spec.js b/pig_latin/pigLatin.spec.js index 1eb4bfb..018936b 100644 --- a/pig_latin/pigLatin.spec.js +++ b/pig_latin/pigLatin.spec.js @@ -15,7 +15,7 @@ // See https://en.wikipedia.org/wiki/Pig_Latin for more details. -var pigLatin = require("./pigLatin.js"); +let pigLatin = require("./pigLatin.js"); describe('#translate', function() { it('translates a word beginning with a vowel', function() { diff --git a/removeFromArray/removeFromArray.js b/removeFromArray/removeFromArray.js index d36b8b1..7f66319 100644 --- a/removeFromArray/removeFromArray.js +++ b/removeFromArray/removeFromArray.js @@ -1,4 +1,4 @@ -var removeFromArray = function() { +let removeFromArray = function() { } diff --git a/removeFromArray/removeFromArray.spec.js b/removeFromArray/removeFromArray.spec.js index ff94e9a..9088df1 100644 --- a/removeFromArray/removeFromArray.spec.js +++ b/removeFromArray/removeFromArray.spec.js @@ -1,4 +1,4 @@ -var removeFromArray = require('./removeFromArray') +let removeFromArray = require('./removeFromArray') describe('removeFromArray', function() { it('removes a single value', function() { diff --git a/repeatString/repeatString.js b/repeatString/repeatString.js index 49dfa90..dfd3be0 100644 --- a/repeatString/repeatString.js +++ b/repeatString/repeatString.js @@ -1,4 +1,4 @@ -var repeatString = function() { +let repeatString = function() { } diff --git a/repeatString/repeatString.spec.js b/repeatString/repeatString.spec.js index 3a33a3f..f787081 100644 --- a/repeatString/repeatString.spec.js +++ b/repeatString/repeatString.spec.js @@ -1,4 +1,4 @@ -var repeatString = require('./repeatString') +let repeatString = require('./repeatString') describe('repeatString', function() { it('repeats the string', function() { diff --git a/reverseString/reverseString.js b/reverseString/reverseString.js index bca22be..df8d3fd 100644 --- a/reverseString/reverseString.js +++ b/reverseString/reverseString.js @@ -1,4 +1,4 @@ -var reverseString = function() { +let reverseString = function() { } diff --git a/reverseString/reverseString.spec.js b/reverseString/reverseString.spec.js index c61ed13..4512add 100644 --- a/reverseString/reverseString.spec.js +++ b/reverseString/reverseString.spec.js @@ -1,4 +1,4 @@ -var reverseString = require('./reverseString') +let reverseString = require('./reverseString') describe('reverseString', function() { it('reverses single word', function() { diff --git a/snakeCase/snakeCase.js b/snakeCase/snakeCase.js index d14f180..3117d70 100644 --- a/snakeCase/snakeCase.js +++ b/snakeCase/snakeCase.js @@ -1,4 +1,4 @@ -var snakeCase = function() { +let snakeCase = function() { } diff --git a/snakeCase/snakeCase.spec.js b/snakeCase/snakeCase.spec.js index 7664be0..44d2c3e 100644 --- a/snakeCase/snakeCase.spec.js +++ b/snakeCase/snakeCase.spec.js @@ -1,4 +1,4 @@ -var snakeCase = require('./snakeCase') +let snakeCase = require('./snakeCase') describe('snakeCase', function() { it('works with simple lowercased phrases', function() { diff --git a/sumAll/sumAll.js b/sumAll/sumAll.js index 863a79d..820caaa 100644 --- a/sumAll/sumAll.js +++ b/sumAll/sumAll.js @@ -1,4 +1,4 @@ -var sumAll = function() { +let sumAll = function() { } diff --git a/sumAll/sumAll.spec.js b/sumAll/sumAll.spec.js index 7f48e7a..5677526 100644 --- a/sumAll/sumAll.spec.js +++ b/sumAll/sumAll.spec.js @@ -1,4 +1,4 @@ -var sumAll = require('./sumAll') +let sumAll = require('./sumAll') describe('sumAll', function() { it('sums numbers within the range', function() { diff --git a/tempConversion/tempConversion.js b/tempConversion/tempConversion.js index 969c37e..0cb6e29 100644 --- a/tempConversion/tempConversion.js +++ b/tempConversion/tempConversion.js @@ -1,8 +1,8 @@ -var ftoc = function() { +let ftoc = function() { } -var ctof = function() { +let ctof = function() { } diff --git a/tempConversion/tempConversion.spec.js b/tempConversion/tempConversion.spec.js index 6f69a7e..d1a4071 100644 --- a/tempConversion/tempConversion.spec.js +++ b/tempConversion/tempConversion.spec.js @@ -1,4 +1,4 @@ -var {ftoc, ctof} = require('./tempConversion') +let {ftoc, ctof} = require('./tempConversion') describe('ftoc', function() { it('works', function() {