describe("About Functions", function() {

  it("should declare functions", function() {
    
    function add(a, b) {
      return a + b;
    }
    
    expect(add(1, 2)).toBe(FILL_ME_IN);
  });

  it("should know internal variables override outer variables", function () {
    var message = "Outer";
    
    function getMessage() {
      return message;
    }
    
    function overrideMessage() {
      var message = "Inner";
      return message;
    }
    
    expect(getMessage()).toBe(FILL_ME_IN);
    expect(overrideMessage()).toBe(FILL_ME_IN);
    expect(message).toBe(FILL_ME_IN);
  });

  it("should have lexical scoping", function () {
    var variable = "top-level";
    function parentfunction() {
        var variable = "local";
      function childfunction() {
          return variable;
      }
      return childfunction();
    }
    expect(parentfunction()).toBe(FILL_ME_IN);
  });

  it("should use lexical scoping to synthesise functions", function () {
    
    function makeIncreaseByFunction(increaseByAmount) {
      return function (numberToIncrease) {
        return numberToIncrease + increaseByAmount;
      };
    }
    
    var increaseBy3 = makeIncreaseByFunction(3);
    var increaseBy5 = makeIncreaseByFunction(5);
    
    expect(increaseBy3(10) + increaseBy5(10)).toBe(FILL_ME_IN);
  });

  it("should allow extra function arguments", function () {
    
    function returnFirstArg(firstArg) {
      return firstArg;
    }
    
    expect(returnFirstArg("first", "second", "third")).toBe(FILL_ME_IN);
    
    function returnSecondArg(firstArg, secondArg) {
      return secondArg;
    }
    
    expect(returnSecondArg("only give first arg")).toBe(FILL_ME_IN);
    
    function returnAllArgs() {
      var argsArray = [];
      for (var i = 0; i < arguments.length; i += 1) {
        argsArray.push(arguments[i]);
      }
      return argsArray.join(",");
    }
    
    expect(returnAllArgs("first", "second", "third")).toBe(FILL_ME_IN);
  });

  it("should pass functions as values", function () {

    var appendRules = function (name) {
      return name + " rules!";
    };
    
    var appendDoubleRules = function (name) {
      return name + " totally rules!";
    };
    
    var praiseSinger = { givePraise: appendRules };
    expect(praiseSinger.givePraise("John")).toBe(FILL_ME_IN);
    
    praiseSinger.givePraise = appendDoubleRules;
    expect(praiseSinger.givePraise("Mary")).toBe(FILL_ME_IN);
      
  });

  it("should use function body as a string", function () {
    var add = new Function("a", "b", "return a + b;");
    expect(add(1, 2)).toBe(FILL_ME_IN);
     
    var multiply = function (a, b) {
      //An internal comment
      return a * b;
    };
    expect(multiply.toString()).toBe(FILL_ME_IN);
  });    
});

@@ -165,34 +165,25 @@
 1, 2)).toBe(
-FILL_ME_IN
+3
 );%0A  %7D);%0A%0A  
@@ -472,34 +472,31 @@
 age()).toBe(
-FILL_ME_IN
+%22Outer%22
 );%0A    expec
@@ -517,34 +517,31 @@
 age()).toBe(
-FILL_ME_IN
+%22Inner%22
 );%0A    expec
@@ -552,34 +552,31 @@
 ssage).toBe(
-FILL_ME_IN
+%22Outer%22
 );%0A  %7D);%0A%0A  
@@ -853,34 +853,31 @@
 ion()).toBe(
-FILL_ME_IN
+%22local%22
 );%0A  %7D);%0A%0A  
@@ -1273,34 +1273,26 @@
 5(10)).toBe(
-FILL_ME_IN
+28
 );%0A  %7D);%0A%0A  
@@ -1484,34 +1484,31 @@
 ird%22)).toBe(
-FILL_ME_IN
+%22first%22
 );%0A    %0A    
@@ -1642,34 +1642,24 @@
 arg%22)).toBe(
-FILL_ME_IN
 );%0A    %0A    
@@ -1911,34 +1911,44 @@
 ird%22)).toBe(
-FILL_ME_IN
+%22first,second,third%22
 );%0A  %7D);%0A%0A  
@@ -2277,34 +2277,37 @@
 ohn%22)).toBe(
-FILL_ME_IN
+%22John rules!%22
 );%0A    %0A    
@@ -2396,34 +2396,45 @@
 ary%22)).toBe(
-FILL_ME_IN
+%22Mary totally rules!%22
 );%0A      %0A  
@@ -2575,34 +2575,25 @@
 1, 2)).toBe(
-FILL_ME_IN
+3
 );%0A     %0A   
@@ -2722,18 +2722,81 @@
 oBe(
-FILL_ME_IN
+'function (a, b) %7B%0A      //An internal comment%0A      return a * b;%0A    %7D'
 );%0A 

Change values in AboutFuntions.js