Created
March 15, 2019 18:17
-
-
Save silent-lad/fd4c31be6866781c8611c828febf04bc to your computer and use it in GitHub Desktop.
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
function Preposition(name_init) { | |
this.name = name_init; | |
this.displayName = function() { | |
console.log(`Preposition is ${this.name}`); | |
} | |
} | |
let these = new Preposition("these"); | |
these.displayName(); // Prints Preposition is these | |
let those = new Preposition("those"); | |
those.displayName(); // Prints Preposition is those | |
these.displayName.call(those); // // Prints:- Preposition is those |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment