Created
June 9, 2018 16:00
-
-
Save sevperez/a190a74e2bd3858cc263e7539f8c7bcf 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
function setMovie(movie) { | |
this.movie = movie; | |
} | |
var theater = { | |
loadProjector: setMovie, | |
playMovie: function(movie, previewLength) { | |
this.loadProjector(movie); | |
setTimeout(function() { | |
console.log("Now playing: " + this.movie); | |
}, previewLength); | |
} | |
}; | |
theater.playMovie("Gremlins", 1000); // "Now playing: undefined" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment