Skip to content

Commit 09ea0b1

Browse files
committed
cont.
1 parent a9cbecb commit 09ea0b1

File tree

2 files changed

+25
-33
lines changed

2 files changed

+25
-33
lines changed

topics/about_assignment.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11

2-
$(document).ready(function(){
2+
module("About Assignment (topics/about_assignment.js)");
33

4-
module("About Assignment (topics/about_assignment.js)");
5-
6-
test("local variables", function() {
7-
var temp = __;
8-
equals(1, temp, "Assign a value to the variable temp");
9-
});
10-
11-
test("global variables", function() {
12-
temp = 1;
13-
equals(temp, window.__, 'global variables are assigned to the window object');
14-
});
4+
test("local variables", function() {
5+
var temp = __;
6+
equals(1, temp, "Assign a value to the variable temp");
7+
});
158

9+
test("global variables", function() {
10+
temp = 1;
11+
equals(temp, window.__, 'global variables are assigned to the window object');
1612
});

topics/about_truthyness.js

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11

2-
$(document).ready(function(){
2+
module("About Truthyness (topics/about_truthyness.js)");
33

4-
module("About Truthyness (topics/about_truthyness.js)");
4+
test("truthyness of positive numbers", function() {
5+
var oneIsTruthy = 1 ? true : false;
6+
equals(oneIsTruthy, __, 'is one truthy?');
7+
});
8+
9+
test("truthyness of negative numbers", function() {
10+
var negativeOneIsTruthy = -1 ? true : false;
11+
equals(negativeOneIsTruthy, __, 'is -1 truthy?');
12+
});
513

6-
test("truthyness of positive numbers", function() {
7-
var oneIsTruthy = 1 ? true : false;
8-
equals(oneIsTruthy, __, 'is one truthy?');
9-
});
10-
11-
test("truthyness of negative numbers", function() {
12-
var negativeOneIsTruthy = -1 ? true : false;
13-
equals(negativeOneIsTruthy, __, 'is -1 truthy?');
14-
});
15-
16-
test("truthyness of zero", function() {
17-
var zeroIsTruthy = 0 ? true : false;
18-
equals(zeroIsTruthy, __, 'is 0 truthy?');
19-
});
14+
test("truthyness of zero", function() {
15+
var zeroIsTruthy = 0 ? true : false;
16+
equals(zeroIsTruthy, __, 'is 0 truthy?');
17+
});
2018

21-
test("truthyness of null", function() {
22-
var nullIsTruthy = null ? true : false;
23-
equals(nullIsTruthy, __, 'is null truthy?');
24-
});
25-
19+
test("truthyness of null", function() {
20+
var nullIsTruthy = null ? true : false;
21+
equals(nullIsTruthy, __, 'is null truthy?');
2622
});

0 commit comments

Comments
 (0)