Redirecting users from one page to another is a very common operation in web applications. In most cases we know exactly which page the user should land on after clicking a link, but sometimes we don't. Imagine you are implementing a profile page that is accessible from both, page A and page B...Read more
There are a lot of basic problems that have elegant solutions in JavaScript and one of them is checking for Palindromes. Palindrome is a word, number, phrase, or other string that reads the same backward as it does forward, for example...Read more
Efficient data manipulation is a must for developers at any level, not only for successful project development, but also for passing job search interviews. With the rapid development of programming languages, frameworks and libraries, it is becoming easier to learn the technology to start coding right away. More and more employers...Read more
Interaction with users is one of the most important parts of any web application and can be done in a number of different ways. You can either create a nice looking custom form to collect data, or sometimes (when creating Minimum Viable Product) use some built-in functionality to trigger...Read more
Events are the crucial part of any web application, so knowing how to handle them properly is a must for a good web developer. There are many built-in events that can be used on any element that extends the EventTarget interface, such as...Read more
If you read the previous article about Event Bubbling, you probably know that event propagation in HTML is done from the innermost element to all of its parents. But what if I told you that it is done the other way around?...Read more
Have you ever noticed that a click handler added to the parent node fires even when child elements are clicked? It may be confusing at first, but that's how Event Bubbling works in JavaScript. In order to properly handle different types of events on DOM nodes...Read more
Accessing object properties is a very common operation in JavaScript. In some cases, it is extremely useful to perform an action just after the property is accessed, but before the result is returned, so that the result can be modified on the fly. One of the possible solutions is to create...Read more
When website users are asked to provide a lot of input, it is important to make sure that the data is not lost if something unexpected happens. One way to ensure this is to store the data somewhere (e.g. in the local storage), so that when the user leaves the page...Read more