Created
June 14, 2011 13:32
-
-
Save omgitsads/1024897 to your computer and use it in GitHub Desktop.
WTF
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
function convert_to_literal_object(a) { | |
var o = {}; | |
for(var i=0;i<a.length;i++) { | |
o[a[i]]=''; | |
} | |
return o; | |
} | |
object = convert_to_literal_object([1,2,3,4]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment