Really nice! I'm just learning JavaScript and this was awesome! Would you mind explaining why did you need to put curly braces on the second example, like below? Thanks!
let { europe } = hometowns;
Yes you need to because you’re destructuring an object
Oh, that makes total sense haha. Thanks a lot for your answer!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Really nice! I'm just learning JavaScript and this was awesome! Would you mind explaining why did you need to put curly braces on the second example, like below? Thanks!
Yes you need to because you’re destructuring an object
Oh, that makes total sense haha. Thanks a lot for your answer!