Created
July 30, 2018 03:54
-
-
Save rrameshbtech/2969307d68ecad741e2e4e0b5d135473 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const City = function (cityName, knownFor) { | |
this.name = cityName; | |
this.speciality = knownFor; | |
this.print = function () { | |
console.log(`${this.name} is know for ${this.speciality}`); | |
}; | |
}; | |
const karur = new City('Karur', 'Textiles'); | |
const coimbatore = new City('Coimbatore', 'Machineries'); | |
karur.print(); // Karur is know for Textiles | |
coimbatore.print(); // Coimbatore is know for Machineries |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment