When we write tests for small individual components like a function or a file of the entire code base, that’s Unit Testing. For writing unit tests, we’ll pick up one functionality/logic and mock the bits on which that one functionality depends.

This might be sounding absurd.

However, read along, this will make sense in just a minute.

For understanding what I meant by mocking, we’ll have to first understand testing in general.

Made this using Figma

This above picture is also known as what is called the testing pyramid. You can read about end to end tests and integration tests here and here. …

setTimeout() method as the name suggests calls a function after the specified time.

Or does it?

But before anything else, syntax. Below is the syntax of setTimeout() which is evaluating the function and logs out ‘Hello!’ after 3 seconds(3000 milliseconds).

Syntax of setTimeout()

Now, let’s run a simple code and see how should setTimeout() work


Disclaimer: This is probably one of the most useless articles you will come across. This is basically me just explaining myself how to make a CSS button with a gradient border(more details below). If you want to understand that(or maybe want the code for it) feel free to go further.

Backstory(that no one asked for apparently): I wanted to make a Button for a website with border-gradient and transparent background with curved border and I wasn’t able to find fuss-free code for it, so here’s me making one for myself. …

Random Simpsons meme, because Simpsons are #1 (Always!!!!)

“Guys, I want #DevFestKol to trend on Twitter,” said Shuvam. You may say that’s a little too much to ask, maybe, but that was not the reply of the outreach team of DevFest Kolkata’19. The origin of this story goes long back.

It all started when a month ago (fine, not that way back) when Shuvam, one of the organisers of the event as well as my senior, texted me, “Hey, I need you for a really important work, I want you to prepare the sponsorship pitch deck for DevFest and write an article about the DevFests in general and…

Fresh into college, fresh into the club and it begins with #IndiaBuildsActions!

For a beginner like me, “Intents” meant Purpose, “fulfilment” was not more than an achievement of something but I came to know there is much more to words than just dictionary meanings.

With just the basic knowledge in programming, it was a bit daunting at first. Building an action that people could talk to, seemed like a lot of intense coding skills would be required for it, turned out there was much more to it than just coding. We had already seen the Heritage Helper in action and…


Don't play with Jazbaat, play with JavaScript instead. It's actually fun. If you already follow me, please don't unfollow me because of this bio.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store