Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (20 sloc) 455 Bytes
<!doctype html>
<html lang="en">
<head>
<title>JavaScript Patterns</title>
<meta charset="utf-8">
</head>
<body>
<script>
/* Title: Array literal
* Description: use array literal notation to avoid potential errors when creating dynamic arrays at runtime
*/
// antipattern
var a = new Array();
// preferred
var a = [];
// References
// http://shop.oreilly.com/product/9780596806767.do
</script>
</body>
</html>