Skip to content

Instantly share code, notes, and snippets.

View rwajon's full-sized avatar

Jonathan Rwabahizi rwajon

View GitHub Profile
@rwajon
rwajon / fetch.html
Created May 6, 2024 09:06
fetch.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/10.0.3/jsoneditor.css"
integrity="sha512-iOFdnlwX6UGb55bU5DL0tjWkS/+9jxRxw2KiRzyHMZARASUSwm0nEXBcdqsYni+t3UKJSK7vrwvlL8792/UMjQ=="
crossorigin="anonymous"
@rwajon
rwajon / parallel.js
Created October 19, 2021 12:43
JS parallel execution
const sleep = (ms) => {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
};
const a = async () => {
console.log("a==>", Date.now());
await sleep(3000);
return "a";