Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ES2015
- function VideoGame(){
- this.title = "Uncharted";
- this.version = 3;
- setInterval(() => {
- console.log(this.title + " " + this.version++); // |this| properly refers to the VideoGame object
- }, 5000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement