diff --git a/01_Day_JavaScript_Refresher/main.js b/01_Day_JavaScript_Refresher/main.js index 072da7b..335d1e3 100644 --- a/01_Day_JavaScript_Refresher/main.js +++ b/01_Day_JavaScript_Refresher/main.js @@ -50,3 +50,5 @@ countries.length % 2 === 0 ? console.log(countries.slice( 0,6 ),countries.slice( 6,12 )); + + diff --git a/01_Day_JavaScript_Refresher/object/index.html b/01_Day_JavaScript_Refresher/object/index.html new file mode 100644 index 0000000..8995074 --- /dev/null +++ b/01_Day_JavaScript_Refresher/object/index.html @@ -0,0 +1,11 @@ + + + + + Object exercises + + + + + + \ No newline at end of file diff --git a/01_Day_JavaScript_Refresher/object/object.js b/01_Day_JavaScript_Refresher/object/object.js new file mode 100644 index 0000000..ef28c81 --- /dev/null +++ b/01_Day_JavaScript_Refresher/object/object.js @@ -0,0 +1,18 @@ +console.log('OBJECT LİTERALS'); + +const dog = { + name:'Lessie', + color:'Brown', + legs: '4', + age: 3, + bark: 'wooof wooof' +} + +console.log(dog.name,dog['color']) + +dog.breed = 'rot'; +dog.GetDogInfo = function(){ + return `this dogs name is ${this.name} and it has good ${this.color} color it has ${this.legs} legs.`; +} + +console.log(dog.GetDogInfo()) \ No newline at end of file