Skip to content

Commit acdaca7

Browse files
authored
Merge pull request #1 from lighthouse-labs/kv/fixes
Kv/fixes
2 parents 66a79e6 + 4ddeb1f commit acdaca7

File tree

4 files changed

+85
-4
lines changed

4 files changed

+85
-4
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# http://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
charset = utf-8
10+
11+
[*.js]
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env

index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Arrays to keep track of each task's state
2-
var taskTitles = [];
3-
var taskComplete = [];
2+
const taskTitles = [];
3+
const taskComplete = [];
44

55
// Create a new task by adding to the arrays
66
// A new task will be created as incomplete
@@ -18,12 +18,14 @@ function completeTask(taskIndex) {
1818
function logTaskState(taskIndex) {
1919
const title = taskTitles[taskIndex];
2020
const complete = taskComplete[taskIndex];
21-
console.log(`${title} has${complete? " " : " not "}been completed`);
21+
console.log(`${title} has${complete ? " " : " not "}been completed`);
2222
}
2323

24+
// DRIVER CODE BELOW
25+
2426
newTask("Clean Cat Litter"); // task 0
2527
newTask("Do Laundry"); // task 1
2628

2729
logTaskState(0); // Clean Cat Litter has not been completed
2830
completeTask(0);
29-
logTaskState(0); // Clean Cat Litter has been completed
31+
logTaskState(0); // Clean Cat Litter has been completed

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)