diff --git a/README.md b/README.md index 33eec55..b6cebbb 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,10 @@ Topics: ## Project Description ### Initialize Project -* Change the JavaScript in the script file to use the new ES6 syntax. +* Change the JavaScript in the script.js file to use the new ES6 syntax. * Change the functions to be arrow functions. * Change the variables to `const` and `let`. +* Change any strings you may encounter to use 'template literals'. ### Steps for submitting a pull request * Change your current working directory to your project: `cd /path/to/project`, diff --git a/script.js b/script.js index 452c0ed..e283cb9 100644 --- a/script.js +++ b/script.js @@ -1,21 +1,21 @@ -var logger = function() { - var message = 'hi'; +const logger = () => { + const message = 'hi'; console.log(message); }; -var looper = function() { - var message = 'I love JS!'; - for (var i = 0; i < 10; i++) { +const looper = () => { + const message = 'I love JS!'; + for (screenLeft i = 0; i < 10; i++) { console.log(message); } }; -var greet = function(name) { - var greeting = 'Hello ' + name + '!'; +const greet = (name) => { + const greeting = `Hello ${name}`; console.log(greeting); }; -var yourName = 'put your name in here'; +const yourName = 'put your name in here'; logger(); looper();