Skip to content

Commit 78cd4b5

Browse files
Update immediate-functions.html
1 parent 1a18057 commit 78cd4b5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

function-patterns/immediate-functions.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
!function () {
1919
console.log('watch out!');
2020
}();
21+
22+
//another alternative with less parentheses
23+
+function () {
24+
console.log('watch out!');
25+
}();
26+
27+
//crockfords the good part book way of doing this
28+
(function () {
29+
console.log('watch out!');
30+
}());
2131

2232

2333
// reference

0 commit comments

Comments
 (0)