parent
284b489b45
commit
4a30ddd1da
@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Object exercises</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script src="object.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,18 +0,0 @@
|
||||
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())
|
Loading…
Reference in new issue