This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var promise = new Promise(function(resolve,reject){ | |
var total = sumNumbers(1,7); | |
if(total > 5){ | |
resolve(true); | |
} | |
else{ | |
reject(false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Vehicle{ | |
constructor(){ this.type = "car"; } | |
start(){ return `Started : ${this.type}`; } | |
} | |
class Car extends Vehicle{ | |
//constructor(){ | |
//mandatory call to base constructor. | |
//super(); | |
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car{ | |
constructor(id,name){ | |
this.id = id; | |
this.name = name; | |
} | |
whoAreYou(){ | |
return `My name is ${this.id} ${this.name}`; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car{ | |
constructor(id){ | |
this.id = id; | |
} | |
} | |
var newCar = new Car(123); | |
newCar.Id = 456; | |
console.log(newCar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am ahmetsonmez on github. | |
* I am ahmetsonmez (https://keybase.io/ahmetsonmez) on keybase. | |
* I have a public key ASDY8vXDUsiRL9HTLcDVefj5JGdzmcFVXfa_BW6UyaPIMAo | |
To claim this, I am signing this object: |