{"id":4369,"date":"2020-06-26T03:02:45","date_gmt":"2020-06-26T00:02:45","guid":{"rendered":"https:\/\/elzero.org\/?p=4369"},"modified":"2020-06-26T03:02:45","modified_gmt":"2020-06-26T00:02:45","slug":"js-oop-important-info-and-the-end","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/js-oop-important-info-and-the-end\/","title":{"rendered":"Important Info And The End"},"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  Importants Notes And The End\r\n  [1] Arrow Functions Do Not Have a Prototype Property.\r\n  [2] You Can Use Objects Inside Constructor Freely\r\n  [3] f = function () {} ==== f() {}\r\n*\/\r\n\r\nclass User {\r\n  constructor(fName, lName, age, email) {\r\n    this.name = {\r\n      first: fName,\r\n      last: lName,\r\n    };\r\n    this.age = age;\r\n    this.email = email;\r\n  }\r\n  sayHello = function () {\r\n    return `Say Hello`;\r\n  };\r\n  sayHi() {\r\n    return `Say Hi`;\r\n  }\r\n}\r\n\r\nlet user1 = new User(\"Osama\", \"Elzero\", 37, \"o@nn.sa\");\r\nconsole.log(user1.name.first);\r\nconsole.log(user1.name.last);\r\nconsole.log(user1.age);\r\nconsole.log(user1.email);\r\nconsole.log(user1.sayHello());\r\nconsole.log(user1.sayHi());\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-4369","post","type-post","status-publish","format-standard","hentry","category-javascript-oop"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4369","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=4369"}],"version-history":[{"count":1,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4369\/revisions"}],"predecessor-version":[{"id":4370,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4369\/revisions\/4370"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=4369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=4369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=4369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}