8000 Transform 'var' in 'let' · Dany-Ing/javascript-exercises@3a9251d · GitHub
[go: up one dir, main page]

< 8000 div class="position-relative header-wrapper js-header-wrapper "> 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() {

0 commit comments

Comments
 (0)
0