Monthly Archives: August, 2022

How to Add Conditional Classes in Alpine JS

In Alpine JS, there are many use cases where you want to conditionally add classes to elements. Unfortunately, the official documentation is a bit...

How to Use x-cloak to Handle Flickering in Alpine JS

When you are using alpine JS and load the page, at first, it displays the content for some milliseconds. In other words, you will...

Add Comma as Thousand Separator to Input Field in JavaScript

If you are working with a simple website or a react application, There are 3 common situations where you have to add a comma...

5 Things You Must Know to Inject Service in Nest JS

Are you trying to inject a Nest JS service into another service but facing errors of dependency? Here is a complete guide on how...

Is it Worth Learning jQuery in 2022

The question "is it worth learning jQuery?" is asked by many developers. As there are tons of javascript frameworks out there, its hard to...

[SOLVED] – Map Function Returns Undefined in JavaScript

If you use .map function and add some conditional statements in the callback function it may return undefined. Here is a simple example where...

How to Check Variable is an Array in JavaScript

Often you need to check if the variable is an array or not. There are many solutions available in javascript but the simplest one...

Archives

Latest articles