One way we can challenge ourselves to grow as JavaScript developers is to practice with quiz questions! The following questions are intended to be ...
For further actions, you may consider blocking this person and/or reporting abuse
Well picked examples. I got something similar to question 8 in one of the js interviews. Also, could you explain question 5 a little more in terms of the event loop? Why promise.all returns in the same order... wouldn’t the event loop resolve based on the settimeout delay once the promise is returned? Thanks
Promise.all waits all promised to be resolved. That 's the simplest explanation
Yes. But my question is regarding the order of printing.
It also ensure the order of data from promises. More info here: developer.mozilla.org/en/docs/Web/...
Thank you for the reference. :)
the console.log is done only once after all promises are resolved, not for each timeout
Will not the print be in the order of resolution even if they are all printed after all the promises are resolved?
No, Promise.all takes an array off promisses and resolves to an array of all promise results in the same order. The array is what will be printed...
Okay!! this is the exact clarification I was looking for! Thank you! :)
Such a coincidence that I stumbled across the fact that comparing arrays that are exactly the same as each other in appearance (e.g. ([] === [])) would yield a false boolean result. So I'm glad to get an explanation for that! And it was a much simpler explanation than I thought haha.
Really great article thanks!
Thanks.
This repo comes to mind:
lydiahallie / javascript-questions
A long list of (advanced) JavaScript questions, and their explanations ✨
JavaScript Questions
I post multiple choice JavaScript questions on my Instagram stories, which I'll also post here! Last updated: December 24th
From basic to advanced: test how well you know JavaScript, refresh your knowledge a bit, or prepare for your coding interview!💪 🚀 I update this repo regularly with new questions. I added the answers in the collapsed sections below the questions, simply click on them to expand it. It's just for fun, good luck! ❤️
Feel free to reach out to me!😊
Instagram || Twitter || LinkedIn || Blog
See 17 Available Translations🇪🇸 🇮🇹 🇩🇪 🇫🇷 🇷🇺 🇨🇳 🇵🇹
1. What's the output?
Thanks! This looks like a great reference.
Thank you!
You're welcome! I'll try to do some more next week
Nice and very beginner friendly.
and this is what makes me cringe, cause fundamentals are fundamentals
You have a new susbcriber! Thanks for the quiz! I have learnt a little bit more of JS!
Wonderful! I hope to put out another version next week with more questions and aswers
Excellent work Nick!
Time for some mind food, and your JS quiz list was a tasty treat! You got a new follower.
Thanks for the nice work, Nick!
Cool!
Nice work, excellent examples!
Thanks!
i found this very helpful, i just began learning "Promise, Aysnc/Await" couldn't relate to the Promise question but i am 100% coming back to answer the quiz. Yup!! I love i saw this article. Thanks
Damn this proves, I've lot to learn about JS even after completing advance JS course from udemy.
Like any other language, JS has its fair share of idiosyncrasies. We all have more to learn!
Thanks a lot! I love the idea of little quizzes like these ones. I really feel that I learn something and discover more things than those huge challenges x.x