diff --git a/topics/about_arrays.js b/topics/about_arrays.js index b2de2547..f9d4b04d 100644 --- a/topics/about_arrays.js +++ b/topics/about_arrays.js @@ -2,23 +2,23 @@ module("About Arrays (topics/about_arrays.js)"); test("array literal syntax and indexing", function() { var favouriteThings = ["cellar door", 42, true]; // note that array elements do not have to be of the same type - equal(__, favouriteThings[0], 'what is in the first position of the array?'); - equal(__, favouriteThings[1], 'what is in the second position of the array?'); - equal(__, favouriteThings[2], 'what is in the third position of the array?'); + equal(cellar door, favouriteThings[0], 'what is in the first position of the array?'); + equal(42, favouriteThings[1], 'what is in the second position of the array?'); + equal(true, favouriteThings[2], 'what is in the third position of the array?'); }); test("array type", function() { - equal(__, typeof([]), 'what is the type of an array?'); + equal(string, typeof([]), 'what is the type of an array?'); }); test("length", function() { var collection = ['a','b','c']; - equal(__, collection.length, 'what is the length of the collection array?'); + equal(3, collection.length, 'what is the length of the collection array?'); }); test("splice", function() { var daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; - var workingWeek = daysOfWeek.splice(__, __); + var workingWeek = daysOfWeek.splice(5, 2); var weekend = daysOfWeek; deepEqual(workingWeek, ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'], 'what is the value of workingWeek?'); @@ -30,8 +30,8 @@ test("stack methods", function() { stack.push("first"); stack.push("second"); - equal(__, stack.pop(), 'what will be the first value popped off the stack?'); - equal(__, stack.pop(), 'what will be the second value popped off the stack?'); + equal("second", stack.pop(), 'what will be the first value popped off the stack?'); + equal("first", stack.pop(), 'what will be the second value popped off the stack?'); }); test("queue methods", function() { @@ -40,6 +40,6 @@ test("queue methods", function() { queue.push("second"); queue.unshift("third"); - equal(__, queue.shift(), 'what will be shifted out first?'); - equal(__, queue.shift(), 'what will be shifted out second?'); + equal("third", queue.shift(), 'what will be shifted out first?'); + equal("first", queue.shift(), 'what will be shifted out second?'); });