Created
September 17, 2013 22:27
-
-
Save mediamichael/6601545 to your computer and use it in GitHub Desktop.
Create an object from a dynamic variable name and assign a global class.
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
var rnd = Math.floor(Math.random()*10000000000); | |
var myVar = "myString" + "_" + rnd; | |
window[ myVar + "_optionalID"] = new classname(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment