Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jerry Vohrer #212

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2514ce2
Update concatenation.js
Jerry-Vrrr Nov 2, 2021
10d1102
Add Section 1
Jerry-Vrrr Nov 4, 2021
fb70589
modify concatenation.js
Jerry-Vrrr Nov 4, 2021
0ab2a84
Add section2 exercises
Jerry-Vrrr Nov 6, 2021
2f72b0c
Add section2 reflections
Jerry-Vrrr Nov 6, 2021
a76e95e
modify reflections
Jerry-Vrrr Nov 6, 2021
2c84c05
modify reflections
Jerry-Vrrr Nov 6, 2021
6b1a114
Update reflection.md
Jerry-Vrrr Nov 6, 2021
7114d11
Update reflection.md
Jerry-Vrrr Nov 6, 2021
cf18be8
Update reflection.md
Jerry-Vrrr Nov 6, 2021
09895a7
Update reflection.md
Jerry-Vrrr Nov 6, 2021
52b789b
Update reflection.md
Jerry-Vrrr Nov 6, 2021
c5fd751
Update reflection.md
Jerry-Vrrr Nov 6, 2021
1eec842
Update reflection.md
Jerry-Vrrr Nov 6, 2021
7406636
Initial commit
Jerry-Vrrr Nov 6, 2021
2ed4e8d
Add array methods
Jerry-Vrrr Nov 6, 2021
884974f
Add exercises
Jerry-Vrrr Nov 7, 2021
3e4efd7
Add reflections
Jerry-Vrrr Nov 7, 2021
4d6f739
Merge branch 'main' of github.com:Jerry-Vrrr/frontend-mod-1-prework
Jerry-Vrrr Nov 7, 2021
55ecd12
Update reflection.md
Jerry-Vrrr Nov 7, 2021
4e18a30
Update reflection.md
Jerry-Vrrr Nov 7, 2021
9fdf9a6
Update reflection.md
Jerry-Vrrr Nov 7, 2021
370ba04
Update reflection.md
Jerry-Vrrr Nov 7, 2021
da18fc7
Update reflection.md
Jerry-Vrrr Nov 7, 2021
ba15f78
Initial commit.
Jerry-Vrrr Nov 8, 2021
1bfde24
Modify reflection
Jerry-Vrrr Nov 9, 2021
8142050
Update README.md
Jerry-Vrrr Nov 11, 2021
0da664c
Update README.md
Jerry-Vrrr Nov 11, 2021
8c00676
Update README.md
Jerry-Vrrr Nov 11, 2021
27d7d2d
Initial commit
Jerry-Vrrr Nov 11, 2021
20dca43
Merge branch 'main' of github.com:Jerry-Vrrr/frontend-mod-1-prework
Jerry-Vrrr Nov 11, 2021
251bf0b
Add annotations.js
Jerry-Vrrr Nov 11, 2021
94d8154
Refactor section1
Jerry-Vrrr Nov 12, 2021
6367707
Refactor Section2
Jerry-Vrrr Nov 12, 2021
c8c46bd
Refactor section3
Jerry-Vrrr Nov 12, 2021
709fce9
Refactor section4
Jerry-Vrrr Nov 12, 2021
cd29ef2
Update README.md
Jerry-Vrrr Nov 13, 2021
19e1b69
Update README.md
Jerry-Vrrr Nov 13, 2021
dce325d
Create README.md
Jerry-Vrrr Nov 13, 2021
1751d8c
Update README.md
Jerry-Vrrr Nov 13, 2021
e79a4e7
Update README.md
Jerry-Vrrr Nov 13, 2021
f2f0def
Add corrections to modZeroHero.js
Jerry-Vrrr Nov 19, 2021
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
Prev Previous commit
Next Next commit
Add annotations.js
  • Loading branch information
Jerry-Vrrr committed Nov 11, 2021
commit 251bf0b71c64ff720a9f319301b9f864b4c3f6ef
18 changes: 13 additions & 5 deletions finalPrep/annotations.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
// Add your annotations, line by line, to the code below using code comments.
// Use the double // to create a new comment

//Build a Bear
//Build a Bear - function with variable categories
function buildABear(name, age, fur, clothes, specialPower) {
//Add greeting using interpolation
var greeting = `Hey partner! My name is ${name} - will you be my friend?!`;
//define demographics as name,age
var demographics = [name, age];
// Add saying using concatenation
var powerSaying = "Did you know that I can " + specialPower + " ?";
//create class titled builtBear with dynamic and fixed values
var builtBear = {
basicInfo: demographics,
clothes: clothes,
@@ -17,26 +21,30 @@ function buildABear(name, age, fur, clothes, specialPower) {

return builtBear
}

//Add 2 instances of buildABear
buildABear('Fluffy', 4, 'brown', ['pants', 'jorts', 'tanktop'], 'give you nightmares');
buildABear('Sleepy', 2, 'purple', ['pajamas', 'sleeping cap'], 'sleeping in');



//FizzBuzz
//FizzBuzz function created with 3 dynamic values num1, num2 and where the loop will end.
function fizzBuzz(num1, num2, range) {
//create dynamic loop when 0 is present log fizzbuzz
for (var i = 0; i <= range; i++) {
if (i % num1 === 0 && i % num2 === 0) {
console.log('fizzbuzz');
//if num1 is present, log fizz
} else if (i % num1 === 0) {
console.log('fizz');
//else if num2 is present, log buzz
} else if (i % num2 === 0) {
console.log('buzz');
} else {
console.log(i);
}
}
}

//execute instances
fizzBuzz(3, 5, 100);
fizzbuzz(5, 8, 400);
//command broken (b nstead of B)
fizzbuzz(5, 8, 400);