DEV Community

Discussion on: July 8th, 2021: What did you learn this week?

mergerg profile image
Raphael • Edited on

This week I learned that you can assign object properties to String variables in JavaScript! Eg, instead of doing " = name" you can do
"let var = 'name';
object[var] = name"
and it'll result in the same thing! Obviously this example is kind of useless but I used this information to basically make an easier-to-assign-to map out of an object with user-defined file names as keys!

nickytonline profile image
Nick Taylor Author

Bobby Moynahan character from SNL saying awesome!