{"id":3657,"date":"2020-06-10T22:22:49","date_gmt":"2020-06-10T19:22:49","guid":{"rendered":"https:\/\/elzero.org\/?p=3657"},"modified":"2020-06-12T22:39:33","modified_gmt":"2020-06-12T19:39:33","slug":"for-in-loop-with-object-properties","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/for-in-loop-with-object-properties\/","title":{"rendered":"For In Loop With Object Properties"},"content":{"rendered":"<h3>\u0627\u0644 Code \u0627\u0644\u0645\u0648\u062c\u0648\u062f \u0641\u064a \u0627\u0644\u062f\u0631\u0633<\/h3>\r\n<script type=\"text\/plain\" class=\"language-javascript\">\r\n\/*\r\n  For ... In Loop\r\n  Loop Through The Properties Of The Objects\r\n*\/\r\n\r\nconst user = {\r\n  name: \"Osama\",\r\n  country: \"Egypt\",\r\n  age: 37,\r\n};\r\n\r\nlet finalData = \"\";\r\n\r\nfor (let info in user) {\r\n  \/\/ console.log(`The ${info} Is => ${user[info]}`);\r\n  finalData += `<div>The ${info} Is => ${user[info]}<\/div>`;\r\n}\r\n\r\n\/\/ console.log(user.country);\r\n\/\/ console.log(user[\"country\"]);\r\n\r\nconsole.log(finalData);\r\n\r\ndocument.getElementById(\"info\").innerHTML = finalData;\r\n\r\n<\/script>\r\n<hr>\r\n<h3>\u0645\u0644\u0627\u062d\u0638\u0627\u062a \u0627\u0644\u062f\u0631\u0633<\/h3>\r\n\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0644\u0627\u062d\u0638\u0627\u062a \u062d\u0627\u0644\u064a\u0627","protected":false},"excerpt":{"rendered":"<p>\u0627\u0644 Code \u0627\u0644\u0645\u0648\u062c\u0648\u062f \u0641\u064a \u0627\u0644\u062f\u0631\u0633 \u0645\u0644\u0627\u062d\u0638\u0627\u062a \u0627\u0644\u062f\u0631\u0633 \u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0644\u0627\u062d\u0638\u0627\u062a \u062d\u0627\u0644\u064a\u0627<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[436],"tags":[],"class_list":["post-3657","post","type-post","status-publish","format-standard","hentry","category-javascript-oop"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/3657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/comments?post=3657"}],"version-history":[{"count":2,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/3657\/revisions"}],"predecessor-version":[{"id":3766,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/3657\/revisions\/3766"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=3657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=3657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=3657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}