learnyounode
learnyounode copied to clipboard
fix(exercise 12): test GET request for fail #446
This is still missing most of the translations for the doc change. This implements a TODO comment.
Note that I am totally new to Node.js and JavaScript, so i might be doing many things wrong here. Please give feedback so i can fix it. have a good day! :-)
do you have any hints maybe? as said, i am totally new to this.
Yeah, we can think of this as if we are using setInterval
just to call the function one more time with another parameter(incrementing count
).
One way is we can use recursion, after finishing the first call, it'll go call the same function with next parameter.
Other is to use a for
loop, this approach will be async which means all the requests will be sent in parallel.
You can try and experiment with these
hmmm.. i am sorry to respond this late.
i remember i first tried simpler solutions liek the ones you sugguested, but the tests would fail, because there were things we had to wait for, so in some way, waiting will be necessary.
should i use some wait(<milliseconds>)
or sleep(<milliseconds>)
kind of call?