Chad Warden :pleromatan: on Nostr: ok, so i need to iterate through an array, but i need to go through 5 at a time, then ...
ok, so i need to iterate through an array, but i need to go through 5 at a time, then idle for 2 minutes
one would think its easy:
for (var i = 0; i < arr.length; i++) {
var previous = 0
for (var x = 0; x < previous+5; x++)
{
arr[x];
}
previous = x
setTimeout(nothingFunction(), 120000)
}
but this isnt working. fuck you js
Published at
2023-07-17 22:45:42Event JSON
{
"id": "0a491339d33c45c80e78ec19574a5a471a4ecb64e6f29ef90fb78321f17e8c99",
"pubkey": "37bcb84e181d2c0b9348dbe8a0e9182ce05f7f7367370618b13cd7e7d926d849",
"created_at": 1689633942,
"kind": 1,
"tags": [
[
"mostr",
"https://freespeechextremist.com/objects/f504c47a-2a7d-4fbc-bdbc-26ae0876ae34"
]
],
"content": "ok, so i need to iterate through an array, but i need to go through 5 at a time, then idle for 2 minutes\n\none would think its easy:\n\nfor (var i = 0; i \u003c arr.length; i++) {\n var previous = 0\n for (var x = 0; x \u003c previous+5; x++)\n {\n arr[x];\n }\n previous = x\n setTimeout(nothingFunction(), 120000)\n}\n\nbut this isnt working. fuck you js",
"sig": "2662c7309ea39a2566767fa99d57964c0bd868736a7d93dde4fa4b6932460d8f48788a183fed6345ab723256fee2537b36cde295448c3c9d1913d4b24f12d978"
}