Javascript examples for Object:Object Literal
Add quotation marks to key-value object
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w. ja v a 2 s . c o m*/ var test=new Object(); test.position="4"; for (var prop in test) { test[prop]="\""+test[prop]+"\""; console.log(prop + " = " + test[prop]); } } </script> </head> <body> </body> </html>