Filter an array!

One of the most common actions is filtering an array to get some of the values of the array. Luckily javascript has a nice method for this. The filter() method. With the following array of car brands we want to filter out the German brand. const carBrands = [ { brand: 'BMW', origin: 'Germany' }, { brand: 'Fiat', origin: 'Italy' }, { brand: 'Mercedes Benz', origin: 'Germany' }, { brand: 'Ford', origin: 'USA' } ] A snippet from a post templateTo

Copy text to the clipboard with javascript!

When I started building this website I wanted the titles of the blog pages to be clickable. When you click on it the page url will be copied to the clipboard. This is a handy feature and for anyone who is also looking for this functionality, this is how i have done it. In your javascript create a textarea element. Then assign the string you want to copy to the clipboard as the value of the textarea. When the element has a value it should be appended to the dom. The select the text inside this

Nuxt static rendering!

My website is build on Nuxt.js and initially it had no managed content so I used the generate function of nuxt and it created a nice dist folder with my static files. I could host these files on an old school ftp server and everything worked perfect and fast. So far so good. After a while I thought it would it would be nice to tell my development experiences. This meant building a blog, the very same one you are reading right now. I started researching my options and got t
Hello! šŸ‘‹