Created
March 30, 2020 07:59
-
-
Save mreigen/d5719c8f04c871b57f200146ea693a03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const name = "com"; | |
let i = 1; | |
const radioDevice = { | |
numberOfComs: 3, | |
[name + "_" + i++]: "port 4556", | |
[name + "_" + i++]: "socket 12", | |
[name + "_" + i++]: "socket 15", | |
}; | |
radioDevice.com_1; | |
// => port 4556 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment