A Pen by Craig Butcher on CodePen.
Created
May 9, 2016 10:51
-
-
Save craigbutcher/24beaceb98f98546183db4ec712efb88 to your computer and use it in GitHub Desktop.
bpzKxE
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
<p>Taken from <a href="http://jsfiddle.net/3f9jugtg/1/">JS Fiddle</a> via <a href="http://stackoverflow.com/a/13556204">Stack Overflow</a></p> | |
<p>thanks</p> | |
<p id="test"></p> |
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 x = {"_11":1, "_22": 2, "_55": 3, "_44":4}; | |
var y = {"11":1, "22": 2, "55": 3, "44":4}; | |
var output = ''; | |
output += '<p>With "_" prefix: <p>'; | |
for(var a in x) output += "<p>" + 'x obj: '+x[a] + "</p>"; | |
output += '<p>Without "_" prefix: <p>'; | |
for(var a in y) output += "<p>" + 'y obj: '+y[a] + "</p>"; | |
document.getElementById('test').innerHTML = output; |
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
body { | |
font: 12px arial; | |
padding: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment