I have a file whose sole purpose is to provide an enormous collection of key/value pairs in an object. It looks something like this:
var myobj = {
some_ke
Add "use strict"; to the top of your file. Example usage:
(function() {
"use strict";
// Throws a syntax error
var a = {
b: 5,
b: 6
};
})();
Edit: This answer is no longer strictly up to date due to ES6 computed property values. If you want, you can write your object as a JSON object (if that's possible) and put it through http://www.jslint.com/, which will check for duplicate keys. See as well: "use strict"; now allows duplicated properties?