All Questions
264 questions
0
votes
0
answers
29
views
JavaScript Failing to Retrieve JSON Field Data from HTML and Execute SQL Query
I'm having trouble with my JavaScript code not properly retrieving and using data sent as JSON from an HTML form. Here's the process:
A user enters a single or multiple addresses in an HTML form.
The ...
0
votes
1
answer
73
views
Async/Synchronous request calls out of order for Browser JS [duplicate]
Using D3.js graphs, I'm trying to draw a path defined by a data array, but there is a TypeError when doing this.
Edit: through debugging, I found that the data array had not been fetched yet.
This is ...
-1
votes
2
answers
353
views
Best way to perform multiple time taking operations for every single item in a large array
I have a function in my javascript code that loops through an array and performs some time-taking actions on each item of the array. It works fine for now when the number of items is low in the array ...
0
votes
0
answers
23
views
Weird behaviour with javascript Arrays and promises [duplicate]
I've been experiencing some behaviour that I don't understand to do with JavaScript arrays. As viewed from the firefox console savedMessages[channelId] displayed differently at different points.
Both ...
0
votes
0
answers
23
views
The values in async array.prototype.every return false, but function evaluates to true [duplicate]
return Dex.mod('gen9').species.all()
.filter(pkmn => pkmn.isNonstandard === null)
.filter(async pkmn => {
const gens = new Generations(Dex);
console.log(moveList.every(...
-2
votes
1
answer
79
views
Array is populated but individual element is undefined javascript [duplicate]
Array is being populated how I wanted it to after formatting some data that I took from a database, but accessing an individual element returns undefined using console.log. I wanted to use this array ...
1
vote
2
answers
72
views
Array.push() not working with Mongoose Populate
I read another post about this issue, but I was unable to figure out how to apply it to my situation (node js Array.push() not working using mongoose)
This is my Mongoose async populate function, what ...
1
vote
1
answer
71
views
Is there a way to to use each value of an array as a function parameter and then store each result in another array or object?
so i have a function that returns array of matchIds. And i have a function that returns object of data from the macth based on the matchID
async function getMatchData(matchId){
const response = ...
-2
votes
2
answers
71
views
How does one map and collect the object IDs of asynchronously retrieved array data? [duplicate]
So I have a JSON File with multiple arrays "ID" that I want to extract.
[
{
"ID": 318,
"Type": 0,
"Value": 3,
},
{
"ID": 580,
...
-3
votes
1
answer
39
views
adding propety to object won't work inside async function
i am trying to add fileUrl property to the order object inside async function but it won't work
i expect the order object to have a fileUrl property after adding it but it won't work
router.get('/...
2
votes
2
answers
2k
views
Why can I not return an array of objects in an async function?
In node.js I am trying to get a list of bid and ask prices from a trade exchange website (within an async function). Within the foreach statement I can console.info() the object data(on each iteration)...
0
votes
0
answers
28
views
Why is the array returned from an async function showing data in some console.log()'s but not others? [duplicate]
I've been trying to read about async functions and promises all day but I can't seem to wrap my head around retreiving the data in my example.
I have the following async function that iterates through ...
0
votes
0
answers
42
views
Upload multiples images with progress observers in firebase
Im traing to upload multiples images from an array of files.
The thing is i want to keep watching the progress of each file.
I have this function
const handleChange = ({ target: { files } }) => {
...
2
votes
2
answers
559
views
Return an array containing the timeout objects for each timeout that's set
So I'm being asked to write a function in JS that will accept an array of callbacks and an array of delays that sets a timeout for each callback in the array with its corresponding delay.
This is the ...
0
votes
3
answers
689
views
JS/TS Filter On AsyncIterable<T>
I have a variable of type AsyncIterable. I want to filter on it, for example (psuedo code below) -
class SomeClass {
private SOME_CONST= "ABCDE";
private async someFunction(): ...