Posts by Anonymous Fox • 15 points
3 posts
-
1
votes1
answer111
viewsQ: How to return the value of a function that uses Javascript promises?
I have a function that should check if a user is enrolled in Stripe. For this is made a request to a third server that returns an array of users. When I make the request, a promise is returned:…
-
0
votes3
answers3761
viewsA: Async/Await returning Promise{<pending>}
On a project I was doing I checked that using fetch(), what was returned was a Promise {state: 'pending'}. To solve this I used await this way: fetch(url, {method:'POST') .then(async(p) => { var…
-
0
votes1
answer143
viewsA: Xampp does not load javascript file, page turns white!
Express or live server Soon after this complication, I found that there are simpler ways to set up a local server. Here are two of them: 1) use express, serving static files 2) In Vscode, use the…