Skip to content

Why push data to array on async/await? #4973

Answered by palamarchukser
jiho5993 asked this question in Q&A
Discussion options

You must be logged in to vote

it happens because you are passing the link to an array. to avoid this behaviour
await p([...res]); // call p func in func.js

before...
1
after...
1

Replies: 0 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@jiho5993
Comment options

@palamarchukser
Comment options

@himself65
Comment options

Answer selected by jiho5993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants