Category: Web

Understand CSS functional pseudo-class selectors :is() and :where()

Long selector lists can occasionally result from developing CSS in order to target numerous items with the same style rules. A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s). Both :is() and :where() are pseudo-class functions that will help shorten and avoid repetition in creating the selectors. They both take an array of arguments of selectors (ids, classes, tags, etc..) and selects any element that can be selected in that list. Read this blog post or watch the video below to learn more about the :is() and :where(). Problem Statement When we...

Read More

Sparse vs Dense Arrays in JavaScript

Arrays in JavaScript is a very important concept. Developers are dealing with Arrays like creating, manipulating etc almost every day while implementing logics. Arrays are very easy to understand in JavaScript. An array is a special variable, which can hold more than one value But do you know that Arrays can hold nothing i.e. it is possible to create hole in an Array? In this post, I will be discussing about Sparse and Dense Arrays. Also I will be talking about how to create them and what you can do with this type of arrays. I have written a...

Read More

Configure Parcel in VS Code for JavaScript Development

In my previous posts, I have written down the steps which will help you to configure ESLint, Prettier, and Husky in Visual Studio Code to make your JavaScript development easy and making sure code syntax, as well as best practices, are being followed. If you haven’t seen that post, I highly recommend you go through that at – Configure ESLint and Prettier in VS Code for JavaScript DevelopmentConfigure Husky in VS Code for JavaScript DevelopmentToday I am going to talk about another important tool when you are dealing with creating packages for your JavaScripts project. It’s called Parcel.From this post, you can expect -Quick introduction of ParcelConfigure Parcel in Visual Studio CodeExamplesQuick Introduction of ParcelParcel is a web application bundler. It’s an alternative of webpack and comes with some different value propositions.The main features which come with Parcel are – Parcel makes sure to perform all the above without any configurations with speed. Pretty impressive, right. Configure Parcel in Visual Studio CodeStep 1 – Initiate npmWe can initiate npm by executing the command “npm init” from the terminal section of the Visual Studio Code. This will ask for a few questions which are very self-explanatory, but we can ignore them by just typing enter. Once the command executes, it will create the file package.json in the workspace.Step 2 – Install ParcelWe can install parcel as dev dependency by executing the command “npm install...

Read More
Loading