malaikuangren

What is the purpose or drive to build thing like (xxx),How can it achieve the original goal of design?

2013年3月12日

what is the difference between json and javascript object.

摘要: There's no such thing as a "JSON Object"By"Cowboy" Ben AlmanonMarch 3, 2010 2:54 PM|15 Comments and 0 ReactionsI want to clear up a common misconception. It’s my belief that developers mistakenly call JavaScript Object literals “JSON Objects” because their syntax is identical 阅读全文

posted @ 2013-03-12 23:52 malaikuangren 阅读(1021) 评论(0) 推荐(0) 编辑
6 ways to define javascript function

摘要: There aresixways/contexts in which to create functions:1) Standard declarative notation (most familiar to people with C background)function foo(){}All the rest are functionexpressions:2) As a method of an object literalvar obj ={ foo:function(){}};3) As a method of an instantiated object (created... 阅读全文

posted @ 2013-03-12 19:24 malaikuangren 阅读(175) 评论(0) 推荐(0) 编辑
Javascript truthy and falsy , Javascript logic operators || and &&

摘要: In JavaScript, logical operators are used for boolean logic where a boolean value may be returned depending on the outcome of an expression. With the||(OR) operator, since values don't need to be explicitlytrueorfalse(they can be truthy or falsy), the operator can return non-boolean results when 阅读全文

posted @ 2013-03-12 16:04 malaikuangren 阅读(482) 评论(0) 推荐(0) 编辑