Skip to content

Commit

Permalink
Merge pull request hackreactor#15 from wyattdanger/master
Browse files Browse the repository at this point in the history
Inconsistent braces
  • Loading branch information
mrdavidlaing committed May 14, 2012
2 parents 656fd24 + 431f0ec commit ff8f175
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions koans/AboutFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ describe("About Functions", function() {

it("should use lexical scoping to synthesise functions", function () {

function makeIncreaseByFunction(increaseByAmount)
{
var increaseByFunction = function increaseBy(numberToIncrease)
{
function makeIncreaseByFunction(increaseByAmount) {
var increaseByFunction = function increaseBy(numberToIncrease) {
return numberToIncrease + increaseByAmount;
};
return increaseByFunction;
Expand All @@ -57,22 +55,19 @@ describe("About Functions", function() {

it("should allow extra function arguments", function () {

function returnFirstArg(firstArg)
{
function returnFirstArg(firstArg) {
return firstArg;
}

expect(returnFirstArg("first", "second", "third")).toBe(FILL_ME_IN);

function returnSecondArg(firstArg, secondArg)
{
function returnSecondArg(firstArg, secondArg) {
return secondArg;
}

expect(returnSecondArg("only give first arg")).toBe(FILL_ME_IN);

function returnAllArgs()
{
function returnAllArgs() {
var argsArray = [];
for (var i = 0; i < arguments.length; i += 1) {
argsArray.push(arguments[i]);
Expand Down

0 comments on commit ff8f175

Please sign in to comment.