@@ -40,10 +40,8 @@ describe("About Functions", function() {
40
40
41
41
it ( "should use lexical scoping to synthesise functions" , function ( ) {
42
42
43
- function makeIncreaseByFunction ( increaseByAmount )
44
- {
45
- var increaseByFunction = function increaseBy ( numberToIncrease )
46
- {
43
+ function makeIncreaseByFunction ( increaseByAmount ) {
44
+ var increaseByFunction = function increaseBy ( numberToIncrease ) {
47
45
return numberToIncrease + increaseByAmount ;
48
46
} ;
49
47
return increaseByFunction ;
@@ -57,22 +55,19 @@ describe("About Functions", function() {
57
55
58
56
it ( "should allow extra function arguments" , function ( ) {
59
57
60
- function returnFirstArg ( firstArg )
61
- {
58
+ function returnFirstArg ( firstArg ) {
62
59
return firstArg ;
63
60
}
64
61
65
62
expect ( returnFirstArg ( "first" , "second" , "third" ) ) . toBe ( FILL_ME_IN ) ;
66
63
67
- function returnSecondArg ( firstArg , secondArg )
68
- {
64
+ function returnSecondArg ( firstArg , secondArg ) {
69
65
return secondArg ;
70
66
}
71
67
72
68
expect ( returnSecondArg ( "only give first arg" ) ) . toBe ( FILL_ME_IN ) ;
73
69
74
- function returnAllArgs ( )
75
- {
70
+ function returnAllArgs ( ) {
76
71
var argsArray = [ ] ;
77
72
for ( var i = 0 ; i < arguments . length ; i += 1 ) {
78
73
argsArray . push ( arguments [ i ] ) ;
0 commit comments