{"id":4356,"date":"2020-06-26T02:41:12","date_gmt":"2020-06-25T23:41:12","guid":{"rendered":"https:\/\/elzero.org\/?p=4356"},"modified":"2020-06-26T02:41:12","modified_gmt":"2020-06-25T23:41:12","slug":"js-oop-class-syntax-and-introduction","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/js-oop-class-syntax-and-introduction\/","title":{"rendered":"Class Syntax And Introduction"},"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  Class\r\n*\/\r\n\r\nclass User {\r\n  constructor(name, email) {\r\n    this.name = name;\r\n    this.email = email;\r\n  }\r\n  sayHello() {\r\n    return `Hello ${this.name}`;\r\n  }\r\n  showEmail() {\r\n    return `Your Email Is ${this.email}`;\r\n  }\r\n}\r\n\r\nlet user1 = new User(\"Osama\", \"o@nn.sa\");\r\nlet user2 = new User(\"Ahmed\");\r\n\r\nconsole.log(user1);\r\nconsole.log(user2);\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-4356","post","type-post","status-publish","format-standard","hentry","category-javascript-oop"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4356","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=4356"}],"version-history":[{"count":1,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4356\/revisions"}],"predecessor-version":[{"id":4357,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/4356\/revisions\/4357"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=4356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=4356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=4356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}