mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Transform 'var' in 'let'
This commit is contained in:
@@ -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!'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user