Skip to content

Commit 7396cf5

Browse files
author
sunjieming
committed
Added README and script
0 parents  commit 7396cf5

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Basic JavaScript Mini
2+
3+
Topics:
4+
* GitHub/Git
5+
* Flow: fork -> clone -> (add/commit/push) -> pull request
6+
* arrow functions `=>`
7+
* `const`
8+
* `let`
9+
10+
## Project Description
11+
12+
### Initialize Project
13+
* Change the JavaScript in the script file to use the new ES6 syntax.
14+
* Change the functions to be arrow functions.
15+
* Change the variables to `const` and `let`.
16+
17+
### Steps for submitting a pull request
18+
* Step 1: Add all of your changes: `git add --all`
19+
* Step 2: Commit your changes: `git commit -m "Changed code to ES6"`
20+
* Step 3: Push your changes: `git push origin master`
21+
* Step 4: On GitHub submit a pull request back to the main repo.
22+
23+
We do code reviews based off of this pull request process.
24+

script.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
var logger = function() {
2+
var message = 'hi';
3+
console.log(message);
4+
};
5+
6+
var looper = function() {
7+
var message = 'I love JS!';
8+
for (var i = 0; i < 10; i++) {
9+
console.log(message);
10+
}
11+
};
12+
13+
var greet = function(name) {
14+
var greeting = 'Hello ' + name + '!';
15+
console.log(greeting);
16+
};
17+
18+
var yourName = 'put your name in here';
19+
20+
logger();
21+
looper();
22+
greet(yourName);

0 commit comments

Comments
 (0)