blob to text javascript

JavaScript
<RESPONSE PROMISE>
.then(r=>r.blob())
.then(r=>{
console.log(r.type)
return new Response(r)
})
.then(r=>
 r.text()
)
.then(console.log)var reader = new FileReader();
reader.onload = function() {
    alert(reader.result);
}
reader.readAsText(blob);
Source

Also in JavaScript: