Here Mudassar Ahmed Khan has explained with an example, how to save BLOB (Binary Data) as file using JavaScript.
The BLOB (Binary Data) sent from Server will be received using XmlHttpRequest AJAX call and then will be sent for download in the Browser using JavaScript.