Skip to content

Commit 60cb81c

Browse files
committed
Merge pull request chuanxshi#23 from ricardohbin/master
Less parentheses in immediate functions
2 parents f00d310 + 6da4823 commit 60cb81c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

function-patterns/immediate-functions.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@
1414
console.log('watch out!');
1515
}());
1616

17+
//alternative with less parentheses
18+
!function () {
19+
console.log('watch out!');
20+
}();
21+
22+
1723
// reference
1824
// http://www.jspatterns.com/
1925
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate
2026
</script>
2127
</body>
22-
</html>
28+
</html>

0 commit comments

Comments
 (0)