0
lets see facebook,
It uses a backend language to send notifications not a front end language (javascript).
Although you can javascript as a backend language( using node.js) to send real time notifications as on facebook.
You can show some info as notifications using javascript(client side).But it can be assumed as a dialog box.