Skip to content

Commit 2135d55

Browse files
updated practice
1 parent 193c903 commit 2135d55

File tree

357 files changed

+75241
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+75241
-21
lines changed

fundamentals.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,39 @@
22

33
// #1: Create an array of strings called `foods` that contains three foods.
44
// Type your solution immediately below this line:
5-
5+
var foods = ["pizza", "burrito", "sushi"];
66

77

88
// #2: Access the last item in the array and assign to a variable called `last`.
99
// Type your solution immediately below this line:
10-
10+
var last = foods[2];
11+
console.log("last food: " + last);
1112

1213

1314
// #3: Create an empty array called `favoriteFoods`.
1415
// Type your solution immediately below this line:
15-
16+
var favoriteFoods = [];
1617

1718

1819
// #4: Create a `for` loop that adds each string in `foods` to `favoriteFoods`.
1920
// Type your solution immediately below this line:
20-
21+
for (var i = 0; i < foods.length; i++) {
22+
favoriteFoods.push(foods[i]);
23+
};
24+
console.log("favorite foods: " + favoriteFoods);
2125

2226

2327
// #5: Create an object literal called `instructor` that contains three key-value pairs.
2428
// Type your solution immediately below this line:
25-
26-
27-
29+
var instructor = {
30+
firstName: "firstName",
31+
lastName: "lastName",
32+
location: "here"
33+
};
34+
console.log(instructor);
2835
// #6: Add a `has-office-hours` (spelled exactly) property to `instructor` by accessing
2936
// it (do not change the original object you typed above) and assigning it
3037
// a boolean value.
3138
// Type your solution immediately below this line:
39+
instructor.hasOfficeHours = true;
40+
console.log(instructor);

gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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
59+
60+
# parcel-bundler cache (https://parceljs.org/)
61+
.cache
62+
63+
# next.js build output
64+
.next
65+
66+
# nuxt.js build output
67+
.nuxt
68+
69+
# vuepress build output
70+
.vuepress/dist
71+
72+
# Serverless directories
73+
.serverless

node_modules/.bin/_mocha

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

node_modules/.bin/_mocha.cmd

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

node_modules/.bin/mkdirp

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

node_modules/.bin/mkdirp.cmd

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

node_modules/.bin/mocha

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

node_modules/.bin/mocha.cmd

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

node_modules/assertion-error/.npmignore

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

node_modules/assertion-error/History.md

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

node_modules/assertion-error/README.md

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

node_modules/assertion-error/index.js

Lines changed: 116 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)