Last active
March 25, 2018 13:09
-
-
Save AjayPoshak/5731575770e7b4a9d9176df9a80bd251 to your computer and use it in GitHub Desktop.
Adding methods to prototypes
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
var Notification = function () { | |
this.notifs = ['A', 'B', 'C'] | |
this.readNotifs = ['B'] | |
this.isPublic = false | |
} | |
Notification.prototype = { | |
markNotifsRead: function() { | |
//Mark notification read | |
} | |
hideNotifs: function() { | |
// Hide notifications after they have been read | |
} | |
markAllNotifsRead: function() { | |
// Mark all notification read | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment