Image gotten from VS Code Marketplace
…
Useful tip of the day ✨
Here’s how to assign a dynamic property name for an object:
const propertyKey = 'type'
const obj = { name: 'JavaScript', [propertyKey]: 'language'}
obj.type
// language
This is done by using the square brackets as supported in ES6, like you see above.
—
That’s it for this week.
I currently have an Instagram account
@deeecode where I share code/tech tips from time to time. Do follow if you’re interested :)
If you’d like to talk about Tech (writing or software engineering) or have questions, you can schedule a meeting with me in my
Calendly profile. Looking forward to meeting you.
As a content creator, I love simplifying diverse topics in web development that I understand. Do you have any issues, tools, or frameworks that you’d like to understand better? Do let me know, and I may come up with an article or video on it.
A new week, another opportunity to do amazing things! So go do amazing things 🚀.
Do have a splendid week 🌟