{"id":369,"date":"2016-06-04T03:56:15","date_gmt":"2016-06-04T03:56:15","guid":{"rendered":"http:\/\/shivaprogramming.com\/blog\/?p=369"},"modified":"2017-05-05T23:50:03","modified_gmt":"2017-05-05T23:50:03","slug":"javascript","status":"publish","type":"post","link":"http:\/\/shivaprogramming.com\/blog\/javascript\/","title":{"rendered":"Learning JavaScript"},"content":{"rendered":"<p>Creating Object in JavaScript<\/p>\n<p><strong>1) Dot \u00a0Notation<\/strong><\/p>\n<pre class=\"lang:default highlight:0 decode:true\">var object={}; object.value=\"This is a value\";<\/pre>\n<p><strong>2) Square Bracket Notation<\/strong><\/p>\n<pre class=\"lang:default highlight:0 decode:true\">var object ={};\r\n\r\nobject['value']=\"This is a value\";<\/pre>\n<p><strong>3) Anonymous Function<\/strong><\/p>\n<pre class=\"lang:default decode:true \">function functionWithName(){\r\n alert(\"Function with name\");\r\n}\r\n\r\nvar anonymous=function(){\r\n alert(\"Function without name\");\r\n}\r\n<\/pre>\n<p><strong>4) Module Pattern<\/strong><\/p>\n<pre class=\"lang:default decode:true epub__programlisting\">(function () {\r\n  \/* module code *\/\r\n}) ( );<\/pre>\n<pre class=\"epub__programlisting \"><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Creating Object in JavaScript 1) Dot \u00a0Notation var object={}; object.value=&#8221;This is a value&#8221;; 2) Square Bracket Notation var object ={}; object[&#8216;value&#8217;]=&#8221;This is a value&#8221;; 3) Anonymous&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-369","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/comments?post=369"}],"version-history":[{"count":15,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/369\/revisions"}],"predecessor-version":[{"id":372,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/posts\/369\/revisions\/372"}],"wp:attachment":[{"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/media?parent=369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/categories?post=369"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivaprogramming.com\/blog\/wp-json\/wp\/v2\/tags?post=369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}