Quota Estimation API

Add the following code in app.js and test it in a browser. Run it again after doing the next exercise.

(async function() {
    if (navigator.storage && navigator.storage.estimate) {
        const q = await navigator.storage.estimate();
        console.log(`quota available: ${parseInt(q.quota/1024/1024)}MiB`);
        console.log(`quota usage: ${q.usage/1024}KiB`);
    }
}
)();