Skip to content

Instantly share code, notes, and snippets.

View ankitsingh1492's full-sized avatar
💻
working !!

Ankit Singh ankitsingh1492

💻
working !!
View GitHub Profile
@ankitsingh1492
ankitsingh1492 / gitcom.md
Created February 2, 2022 17:20 — forked from jednano/gitcom.md
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init
@ankitsingh1492
ankitsingh1492 / gist:a24fb226fe8cc6a70d4f9737bb45362b
Last active September 8, 2021 17:45
Method to chain async calls
async function fetchChainedData() {
const ids = [1, 2,3,4,5,6];
await ids.reduce(async (previousRequest, id) => {
await previousRequest;
const response = await fetch(
`https://jsonplaceholder.typicode.com/todos/${id}`
);
if (response.ok) {