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
12 changes: 12 additions & 0 deletions solutions/04_Clickhandler/click.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$(document).ready(function(){

console.log("hegjkhsgfsd");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanna see you pronounce this one ;-)


$("div").click(function(){

var output = $(this).html();

console.log(output);

});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great

});
12 changes: 12 additions & 0 deletions solutions/04_Clickhandler/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="click.js"></script>
</head>

<body>
<div>Hello</div>
<div>wieners</div>
</body>
</html>
10 changes: 10 additions & 0 deletions solutions/09_length/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<script src="length.js"></script>
</head>

<body>


</body>
</html>
3 changes: 3 additions & 0 deletions solutions/09_length/length.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var thing = "things";

console.log(thing.length);
18 changes: 18 additions & 0 deletions solutions/Cond_4/grade.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var grade = 200;

if(grade <= 65){
console.log("F");
}
else if(grade <= 74){
console.log("C");
}

else if(grade <= 89){
console.log("B");
}

else if(grade <= 100){
console.log("A");
}else{
console.log("Number too high.");
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good as is, but do you think we can make it even better? Maybe factor out the console.log calls? Lemme know if you want an example.

6 changes: 6 additions & 0 deletions solutions/Factorial/prod15.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
for(var x = 1; x > 16; x++){
var total = 1;
var newtotal *= total * x;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're obviously headed in the right direction, but just a couple things:

  • the loop won't even execute once since your condition is x > 16 when you initialize x with 1. You prolly wanted x < 16.
  • try to declare your variables outside of the loop or else you'll get them reset upon each iteration.


console.log(newtotal);