3 ms·
can't you just do _dontcare = {es5: syntax, /*with comments*/} data = JSON.stringify(_dontcare) ?
by riffraff 13y ago
can't you just do
_dontcare = {es5: syntax, /*with comments*/}
data = JSON.stringify(_dontcare)
?
- veidelis 13y agoNo, because syntax is undefined. Trailing comma and comment is removed when it is stringified.
- captainmuon 13y agoYeah, you can do that in your .js source, but not in a separate, non-executed file. It is useful IMHO to separate static data from code. Also, this is useful for configuration files.