---
title: "Shivaansh Agarwal (@shivaansh) | Hashnode"
description: "Frontend Software Engineer. Read the latest articles by Shivaansh Agarwal on Hashnode."
url: "https://hashnode.com/@shivaansh"
---

@shivaansh

# Shivaansh Agarwal

@shivaansh · India · Joined November 2020

Frontend Software Engineer

### [retry mechanism polyfill for JS fetch API with delay between each retry](https://shivaansh.hashnode.dev/retry-mechanism-polyfill-for-js-fetch-api-with-delay-between-each-retry?utm_source=hashnode&utm_medium=feed)

Problem Statement This question was asked to me for a Senior Frontend Engineer role for a leading Indian Tech Startup. Let’s say we’ve a function like getUsers which makes an API call and returns us a promise like following. The API call could be mad...

2 min read · [shivaansh.hashnode.dev](https://shivaansh.hashnode.dev/retry-mechanism-polyfill-for-js-fetch-api-with-delay-between-each-retry?utm_source=hashnode&utm_medium=feed)

[Jan 21, 2025](https://hashnode.com/posts/retry-mechanism-polyfill-for-js-fetch-api-with-delay-between-each-retry/678f14e1899ebd0b9bad471a)

### [Mastering function currying in JS for Senior Frontend Interviews](https://shivaansh.hashnode.dev/currying-in-js-important-questions?utm_source=hashnode&utm_medium=feed)

What is Currying? It’s an application of a closure. It’s a process in functional programming, in which we transform a function with multiple arguments into a sequence of nesting functions that take one argument at a time. So fn(a,b,c) will be tran...

2 min read · [shivaansh.hashnode.dev](https://shivaansh.hashnode.dev/currying-in-js-important-questions?utm_source=hashnode&utm_medium=feed)

[Jan 20, 2025](https://hashnode.com/posts/currying-in-js-important-questions/678dc3534ca59747cbbbb9b7)

### [debounce polyfill: cancel, flush, and advanced features for Senior Frontend Engineer Interviews](https://shivaansh.hashnode.dev/debounce-polyfill-advanced?utm_source=hashnode&utm_medium=feed)

Problem Statement Let’s go to lodash’s documentation for debounce and try to implement a polyfill for that. We’ll be building this in 3 steps. Write polyfill for a debounce function, which creates a debounced function that delays invoking func until...

3 min read · [shivaansh.hashnode.dev](https://shivaansh.hashnode.dev/debounce-polyfill-advanced?utm_source=hashnode&utm_medium=feed)

[Jan 19, 2025](https://hashnode.com/posts/debounce-polyfill-advanced/678c71d318139c2c366cb4c6)

### [Debouncing in Javascript.](https://shivaansh.hashnode.dev/debouncing-in-javascript?utm_source=hashnode&utm_medium=feed)

While designing web applications, we need to optimize for certain scenarios, where we don't want to call a function repeatedly multiple times. An example of this could be, a callback function that is executed on window resize or a scroll event. An...

5 min read · [shivaansh.hashnode.dev](https://shivaansh.hashnode.dev/debouncing-in-javascript?utm_source=hashnode&utm_medium=feed)

[Mar 11, 2022](https://hashnode.com/posts/debouncing-in-javascript/622a9f746810179d5b053256)

### [How to make your Javascript Functions sleep?](https://shivaansh.hashnode.dev/how-to-make-your-javascript-functions-sleep?utm_source=hashnode&utm_medium=feed)

We may encounter some scenarios where we have to pause the execution of a function for some fixed amount of time. Many programming languages already have a built-in sleep method available.To halt a program for 2 seconds, we've got the following imple...

2 min read · [shivaansh.hashnode.dev](https://shivaansh.hashnode.dev/how-to-make-your-javascript-functions-sleep?utm_source=hashnode&utm_medium=feed)

[Mar 10, 2022](https://hashnode.com/posts/how-to-make-your-javascript-functions-sleep/622a0c0be552e99d82e58a92)
