Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
16 changes: 8 additions & 8 deletions script.js
Original file line number Diff line number Diff line change
@@ -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();
Expand Down