Created
April 3, 2014 15:05
-
-
Save larzconwell/9956080 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
ports = [22, 80] | |
data = {ports: {}} | |
ports.forEach(function (p) { | |
var addr = 'localhost:' + p | |
data.ports[p] = addr // For some reason keys end up strings, event though p is a number. | |
}) | |
console.log(data.ports) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment