From 431f0ec7a8e20411bf4a031d6369f971872ed410 Mon Sep 17 00:00:00 2001 From: Stephen Wyatt Bush Date: Sun, 13 May 2012 22:22:58 -0300 Subject: [PATCH] Making function braces consistent --- koans/AboutFunctions.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/koans/AboutFunctions.js b/koans/AboutFunctions.js index 1a2f53cc9..5fde3e2fb 100644 --- a/koans/AboutFunctions.js +++ b/koans/AboutFunctions.js @@ -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; @@ -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]);