Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (21 sloc) 468 Bytes
<!doctype html>
<html lang="en">
<title>JavaScript Patterns</title>
<meta charset="utf-8">
/* Title: Object literal
* Description: use the simpler and reliable object literal instead of new Object();
// antipattern
var car = new Object();
car.goes = "far";
// preferred
var car = {goes:"far"};
// References