Skip to content

Instantly share code, notes, and snippets.

View AjayPoshak's full-sized avatar

Ajay Poshak AjayPoshak

View GitHub Profile
@AjayPoshak
AjayPoshak / prototype.js
Last active January 20, 2018 16:40
Initialization of Prototype
function Notification() {
this.notifs = ['A', 'B', 'C']
this.readNotifs = ['B']
this.isPublic = false
}
@AjayPoshak
AjayPoshak / prototype-inst.js
Created January 20, 2018 15:52
instantiate prototypes
var eventsNotifs = new Notification();
console.log(eventsNotifs.notifs); // Output: A, B, C
eventsNotifs.markAllNotifsRead(); // Mark all notification as read