From f046a52eae2f5378d4085bca109261792645f982 Mon Sep 17 00:00:00 2001 From: gyfnice <751143842@qq.com> Date: Fri, 27 Dec 2013 16:27:48 +0800 Subject: [PATCH 1/3] good shoud replace better~~~ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e22d08bb6..ff0d8035be 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ // bad var item = new Object(); - // good + // better var item = {}; ``` From 66f0c1d6c5ebe74d38cb6b62a6b16b49b590c0c3 Mon Sep 17 00:00:00 2001 From: gyfnice <751143842@qq.com> Date: Mon, 6 Jan 2014 17:10:07 +0800 Subject: [PATCH 2/3] i know --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff0d8035be..3e22d08bb6 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ // bad var item = new Object(); - // better + // good var item = {}; ``` From a9dd1194f42724746ea52339c3ca136d1599b300 Mon Sep 17 00:00:00 2001 From: gyfnice <751143842@qq.com> Date: Mon, 6 Jan 2014 17:15:11 +0800 Subject: [PATCH 3/3] about stack traces --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e22d08bb6..1912d87c9f 100644 --- a/README.md +++ b/README.md @@ -1094,15 +1094,15 @@ } ``` - - Name your functions. This is helpful for stack traces. + - Name your functions. This is helpful for stack traces. //I don't understand why this can stack traces?? ```javascript - // bad + // bad I think this is good. var log = function(msg) { console.log(msg); }; - // good + // good I can't understand why is good? I think is not necessary js style.I hope you can explain this problem for me, I really confused. thank you. var log = function log(msg) { console.log(msg); };