From f7ad8f70db3af5c101479acd893dc045c4f6c446 Mon Sep 17 00:00:00 2001 From: John Pelley Date: Tue, 5 Sep 2017 13:19:13 -0700 Subject: [PATCH 1/2] help --- script.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/script.js b/script.js index 452c0ed..bc65e39 100644 --- a/script.js +++ b/script.js @@ -1,21 +1,22 @@ -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 = () => { + } var message = 'I love JS!'; + for (let i = 0; i < 10; i++) { console.log(message); } }; -var greet = function(name) { - var greeting = 'Hello ' + name + '!'; +const greet = (name)=> { + var greeting = 'Hello my name is ${name}!'; + console.log(greeting); }; -var yourName = 'put your name in here'; +const yourName = 'John'; logger(); looper(); From c4c030861a9ac3a466618d94c8cb01488f691f83 Mon Sep 17 00:00:00 2001 From: John Pelley Date: Tue, 5 Sep 2017 15:57:04 -0700 Subject: [PATCH 2/2] fixed script I hope --- script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index bc65e39..4c0fe33 100644 --- a/script.js +++ b/script.js @@ -1,17 +1,17 @@ -const logger = ()=> { +const logger = () => { const message = 'hi'; console.log(message); }; const looper = () => { - } var message = 'I love JS!'; + const message = 'I love JS!'; for (let i = 0; i < 10; i++) { console.log(message); } }; const greet = (name)=> { - var greeting = 'Hello my name is ${name}!'; + const greeting = `Hello my name is ${name}!`; console.log(greeting); };