Skip to content

Instantly share code, notes, and snippets.

@silent-lad
Last active March 15, 2019 11:08
Show Gist options
  • Save silent-lad/4360db572947255e91c13e52755d44ec to your computer and use it in GitHub Desktop.
Save silent-lad/4360db572947255e91c13e52755d44ec to your computer and use it in GitHub Desktop.
function Those(init) {
this.is_a_preposition = init;
this.displayProperty = function() {
console.log(`Is those a preposition? : ${this.is_a_preposition}`);
}
}
let word = new Those("yes");
word.displayProperty(); //Prints :- Is those a preposition? : yes
let word2 = new Those("no");
word2.displayProperty(); //Prints :- Is those a preposition? : no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment