Passionate about solving problems since 2012! I'm a full stack web developer with experience in AWS, TypeScript and React. Looking for new opportunities!
That's called destructuring assignment. "a" probably is an object which has the hostname property so that assignment extracts hostname.
I'm just writin about this 😅. Hopefully that'll help you.
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.
Javascript!
Can you please explain what
const { hostname } = a;
does and how?
It has the same effect as:
const hostname = a.hostname
That's called destructuring assignment. "a" probably is an object which has the hostname property so that assignment extracts hostname.
I'm just writin about this 😅. Hopefully that'll help you.