Javascript - How to remove an element from an array using splice
You can delete an item in an array using the splice function. All you need to know is the index of the element you want to »
You can delete an item in an array using the splice function. All you need to know is the index of the element you want to »
In JavaScript, you can use try, catch and finally statements to handle exceptions. Below is an example of how you can use a try-catch statement in »
In JavaScript, a switch statement can be used to perform different actions based on different conditions. The switch statement tests the value of a variable or »
You can get an instance of the date object with the current time and date using let date = new Date();. If you call .toString() on this »
You are likely on this page for one of three reasons: 1) You have not yet seen that replaceAll has been implemented in all modern browsers, »
In Javascript you can iterate over the properties of an object using a for in loop. If we have the following javascript object with two string »
In Javascript you can use setTimeout to set a time for a function to be triggered, it will only be triggered once. If you want to »
I wanted to make my website score a little bit better on Google pagespeed and one area was the size of my images. I use background »
You might have stumbled upon this or known it for some time. But it is completely valid to not declare variables in javascript and just assign »
Every year Google Lighthouse and pagespeed gives me more to do. This time my site was slowed down because of background images not being lazy loaded. »