If you remove the images you'll need to update
const coffees = [ { name: "Perspiciatis", image: "images/coffee1.jpg" }, { name: "Voluptatem", image: "images/coffee2.jpg" }, { name: "Explicabo", image: "images/coffee3.jpg" }, { name: "Rchitecto", image: "images/coffee4.jpg" }, { name: " Beatae", image: "images/coffee5.jpg" }, { name: " Vitae", image: "images/coffee6.jpg" }, { name: "Inventore", image: "images/coffee7.jpg" }, { name: "Veritatis", image: "images/coffee8.jpg" }, { name: "Accusantium", image: "images/coffee9.jpg" }, ]
To show your images first then, to cache your new images you'll to update the assets array on the service worker file.
assets
const staticDevCoffee = "dev-coffee-site-v1" const assets = [ "/", "/index.html", "/css/style.css", "/js/app.js", "/images/coffee1.jpg", "/images/coffee2.jpg", "/images/coffee3.jpg", "/images/coffee4.jpg", "/images/coffee5.jpg", "/images/coffee6.jpg", "/images/coffee7.jpg", "/images/coffee8.jpg", "/images/coffee9.jpg", ] self.addEventListener("install", installEvent => { installEvent.waitUntil( caches.open(staticDevCoffee).then(cache => { cache.addAll(assets) }) ) })
Thank you so much.
Sir, I wanted to ask you if we can print the table of a number, e.g =7 Without using for loop. Only by using higher order functions in js
let numbers = [7]; const x = numbers.map(number => number* (for(i=0;i<10;i++));
Somewhat in this manner?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you remove the images you'll need to update
To show your images first then, to cache your new images you'll to update the
assets
array on the service worker file.Thank you so much.
Sir, I wanted to ask you if we can print the table of a number, e.g =7
Without using for loop. Only by using higher order functions in js
let numbers = [7];
const x = numbers.map(number => number* (for(i=0;i<10;i++));
Somewhat in this manner?