DIFF.BLOG
New
Following
Discover
Jobs
More
Suggest a blog
Upvotes plugin
Report bug
Contact
About
Sign up  
Dynamic access to an object property in JavaScript
1
·
Coderslang Master
·
Dec. 17, 2021, 5:27 a.m.
Summary
To access the object property dynamically in JS, you need to pass the property name as a string in square brackets. const user = { age: 25, name: 'Jack' } let key = 'age'; console....
Read full post on learn.coderslang.com →
Submit
AUTHOR
RECENT POSTS FROM THE AUTHOR