Skip to content

Commit 3a9251d

Browse files
Transform 'var' in 'let'
1 parent b99fe58 commit 3a9251d

27 files changed

+31
-31
lines changed

caesar/caesar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var caesar = function() {
1+
let caesar = function() {
22

33
}
44

caesar/caesar.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var caesar = require('./caesar')
1+
let caesar = require('./caesar')
22

33
describe('caesar', function() {
44
it('works with single letters', function() {

calculator/calculator.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var calculator = require ('./calculator.js');
1+
let calculator = require ('./calculator.js');
22

33
describe('add', function() {
44
it('adds 0 and 0', function() {

fibonacci/fibonacci.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var fibonacci = function() {
1+
let fibonacci = function() {
22

33
}
44

fibonacci/fibonacci.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var fibonacci = require('./fibonacci')
1+
let fibonacci = require('./fibonacci')
22

33
describe('fibonacci', function() {
44
it('works', function() {

generator-exercise/generators/app/templates/title.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var <%= title %> = function() {
1+
let <%= title %> = function() {
22

33
}
44

generator-exercise/generators/app/templates/title.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var <%= title %> = require('./<%=title%>')
1+
let <%= title %> = require('./<%=title%>')
22

33
describe('<%=title%>', function() {
44
it('EDITME', function() {

helloWorld/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This setup should be the same for all of the exercises. The plain javascript fi
1010

1111
Let's look at the spec file first:
1212
```javascript
13-
var helloWorld = require('./helloWorld');
13+
let helloWorld = require('./helloWorld');
1414

1515
describe('Hello World', function() {
1616
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
2626

2727
so let's look at the javascript file:
2828
```javascript
29-
var helloWorld = function() {
29+
let helloWorld = function() {
3030
return ''
3131
}
3232

@@ -40,7 +40,7 @@ Just to make sure, in case you're confused at this point, the test is telling yo
4040

4141
this is what the final function should look like:
4242
```javascript
43-
var helloWorld = function() {
43+
let helloWorld = function() {
4444
return 'Hello, World!'
4545
}
4646

helloWorld/helloWorld.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
var helloWorld = function() {
1+
let helloWorld = function() {
22
return ''
33
}
44

5-
module.exports = helloWorld
5+
module.exports = helloWorld

helloWorld/helloWorld.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var helloWorld = require('./helloWorld');
1+
let helloWorld = require('./helloWorld');
22

33
describe('Hello World', function() {
44
it('says hello world', function() {

leapYears/leapYears.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var leapYears = function() {
1+
let leapYears = function() {
22

33
}
44

leapYears/leapYears.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var leapYears = require('./leapYears')
1+
let leapYears = require('./leapYears')
22

33
describe('leapYears', function() {
44
it('works with non century years', function() {

palindromes/palindromes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var palindromes = function() {
1+
let palindromes = function() {
22

33
}
44

palindromes/palindromes.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var palindromes = require('./palindromes')
1+
let palindromes = require('./palindromes')
22

33
describe('palindromes', function() {
44
it('works with single words', function() {

pig_latin/pigLatin.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
// See https://en.wikipedia.org/wiki/Pig_Latin for more details.
1717

18-
var pigLatin = require("./pigLatin.js");
18+
let pigLatin = require("./pigLatin.js");
1919

2020
describe('#translate', function() {
2121
it('translates a word beginning with a vowel', function() {

removeFromArray/removeFromArray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var removeFromArray = function() {
1+
let removeFromArray = function() {
22

33
}
44

removeFromArray/removeFromArray.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var removeFromArray = require('./removeFromArray')
1+
let removeFromArray = require('./removeFromArray')
22

33
describe('removeFromArray', function() {
44
it('removes a single value', function() {

repeatString/repeatString.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var repeatString = function() {
1+
let repeatString = function() {
22

33
}
44

repeatString/repeatString.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var repeatString = require('./repeatString')
1+
let repeatString = require('./repeatString')
22

33
describe('repeatString', function() {
44
it('repeats the string', function() {

reverseString/reverseString.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var reverseString = function() {
1+
let reverseString = function() {
22

33
}
44

reverseString/reverseString.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var reverseString = require('./reverseString')
1+
let reverseString = require('./reverseString')
22

33
describe('reverseString', function() {
44
it('reverses single word', function() {

snakeCase/snakeCase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var snakeCase = function() {
1+
let snakeCase = function() {
22

33
}
44

snakeCase/snakeCase.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var snakeCase = require('./snakeCase')
1+
let snakeCase = require('./snakeCase')
22

33
describe('snakeCase', function() {
44
it('works with simple lowercased phrases', function() {

sumAll/sumAll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var sumAll = function() {
1+
let sumAll = function() {
22

33
}
44

sumAll/sumAll.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var sumAll = require('./sumAll')
1+
let sumAll = require('./sumAll')
22

33
describe('sumAll', function() {
44
it('sums numbers within the range', function() {

tempConversion/tempConversion.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
var ftoc = function() {
1+
let ftoc = function() {
22

33
}
44

5-
var ctof = function() {
5+
let ctof = function() {
66

77
}
88

tempConversion/tempConversion.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var {ftoc, ctof} = require('./tempConversion')
1+
let {ftoc, ctof} = require('./tempConversion')
22

33
describe('ftoc', function() {
44
it('works', function() {

0 commit comments

Comments
 (0)