From 4a5e56984c9824bafd9128870b6465ecbdf4840d Mon Sep 17 00:00:00 2001 From: Adam Oates Date: Wed, 6 Sep 2017 23:09:50 +0000 Subject: [PATCH] completed basic javascript mini by Adam Oates --- script.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/script.js b/script.js index 452c0ed..3e29b7a 100644 --- a/script.js +++ b/script.js @@ -1,21 +1,17 @@ -var logger = function() { - var message = 'hi'; - console.log(message); +const logger = () => { + console.log(`hi`); }; -var looper = function() { - var message = 'I love JS!'; - for (var i = 0; i < 10; i++) { +const looper = () => { + const message = `I love JS!`; + for (let i = 0; i < 10; i++) { console.log(message); } }; -var greet = function(name) { - var greeting = 'Hello ' + name + '!'; - console.log(greeting); -}; - -var yourName = 'put your name in here'; +const greet = (name) => console.log(`Hello + name ${name}!`); + +const yourName = 'Adam Oates'; logger(); looper();