Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Consolidate output comment format.
They all output the same string, which may be good to point out.
  • Loading branch information
Markus Amalthea Magnuson committed Apr 18, 2013
commit 3e6354e56817829e4d5234c801467dd5eb3369c7
8 changes: 4 additions & 4 deletions page/javascript-101/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var greet = function( person, greeting ) {
console.log( text );
};

greet( "Rebecca", "Hello" );
greet( "Rebecca", "Hello" ); // "Hello, Rebecca"
```

```
Expand All @@ -47,7 +47,7 @@ var greet = function( person, greeting ) {
return text;
};

console.log( greet( "Rebecca", "hello" ) ); // "hello, Rebecca"
console.log( greet( "Rebecca", "Hello" ) ); // "Hello, Rebecca"
```

```
Expand All @@ -62,7 +62,7 @@ var greet = function( person, greeting ) {

var greeting = greet( "Rebecca", "Hello" );

greeting();
greeting(); // "Hello, Rebecca"
```

## Immediately-Invoked Function Expression (IIFE)
Expand Down Expand Up @@ -91,7 +91,7 @@ var myFn = function( fn ) {
console.log( result );
};

// logs "hello world"
// Logs "hello world"
myFn( function() {
return "hello world";
});
Expand Down