From 4c976743487af7cc31d51003d332c5e59028d18a Mon Sep 17 00:00:00 2001 From: DrMadWill <87474631+DrMadWill@users.noreply.github.com> Date: Mon, 6 Dec 2021 21:00:20 +0400 Subject: [PATCH] 13 OOP > Object > add --- .../HTML/index.html | 37 ++++++++++ .../Js/43_13_1_Object.js | 69 +++++++++++++++++++ .../13_Object_Oriented/documentation.md | 17 +++++ README.md | 5 +- 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 13_Object_Oriented_Programming/HTML/index.html create mode 100644 13_Object_Oriented_Programming/Js/43_13_1_Object.js create mode 100644 Documantation/13_Object_Oriented/documentation.md diff --git a/13_Object_Oriented_Programming/HTML/index.html b/13_Object_Oriented_Programming/HTML/index.html new file mode 100644 index 0000000..f9aca34 --- /dev/null +++ b/13_Object_Oriented_Programming/HTML/index.html @@ -0,0 +1,37 @@ + + + + Title + + + + + + + + + +
+ ... +
+
Card title
+
Card subtitle
+

Some quick example text to build on the card title and make up the bulk of the card's content.

+ b5 +
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/13_Object_Oriented_Programming/Js/43_13_1_Object.js b/13_Object_Oriented_Programming/Js/43_13_1_Object.js new file mode 100644 index 0000000..21ddc2d --- /dev/null +++ b/13_Object_Oriented_Programming/Js/43_13_1_Object.js @@ -0,0 +1,69 @@ + +//* Testing +console.log("Hello") + + +let num; +num = 10; // Primitive yalnız bir dəyər tutur başqa fuksiyası yoxdur + +// Object Litreal +let student={ // Object müəyyən bir funksiyası var, birden çox dəyər tutur. + id:"15a", + name:"Ali", + age:15, +} + +//* Funcition Ctor + +// Funcition Decleration + +// function Student(id,name,age) { // Constroctor Define +// this.id=id; +// this.name=name; +// this.age=age; + +// this.BirthYear=function(){ +// let date=new Date +// return date.getFullYear() - this.age +// } + +// } + +// Funcition Expration + +// let Student=function(id,name,age){ +// this.id=id; +// this.name=name; +// this.age=age; + +// this.BirthYear=function(){ +// let date=new Date +// return date.getFullYear() - this.age +// } +// } + +// Class use + +class Student{ + constructor(id,name,age){ + this.id=id; + this.name=name; + this.age=age; + } + + BirthYear=function(){ + let date=new Date + return date.getFullYear() - this.age + } +} + +let student2=new Student("15b","Sakura",15); // instance +console.log(student2) +console.log(student2.BirthYear()) + + + + + + + diff --git a/Documantation/13_Object_Oriented/documentation.md b/Documantation/13_Object_Oriented/documentation.md new file mode 100644 index 0000000..f85c8ae --- /dev/null +++ b/Documantation/13_Object_Oriented/documentation.md @@ -0,0 +1,17 @@ +# Object Oriented Programming + +## Primitive Type +- Numbers +- String +- Bools +- Null +- Underfined + +## Object Type +- Array +- Funcition +- **Primitive** başqa hamsı .... + +## (Funcition)Constractor C# daki classlarla eyni anlayşdır. +> Yaradcağımız obeyktlərin qəlibidir. + diff --git a/README.md b/README.md index 561a44f..ecda070 100644 --- a/README.md +++ b/README.md @@ -105,4 +105,7 @@ - [My Documantation](https://github.com/DrMadWill/JavaScript/blob/main/Documantation/12_JQuery/documantation.md#animate) - [Messange Box App](https://github.com/DrMadWill/JavaScript/blob/main/12_JQery/40_12_10_MessageBox.html#L47) - [Back To Top App](https://github.com/DrMadWill/JavaScript/blob/main/12_JQery/41_12_11_Back_To_top.html#L246) -- [Form Validation](https://github.com/DrMadWill/JavaScript/blob/main/12_JQery/42_12_11_Form_Validation.html) \ No newline at end of file +- [Form Validation](https://github.com/DrMadWill/JavaScript/blob/main/12_JQery/42_12_11_Form_Validation.html) + +### Object Oriented Programming +- Object and Constroctor