Defining constants in JavaScript
You could a least separate the variables declarations into constants and variables:

var URL_KEY = 'CurrentURL';

var appName = 'MyApp',
    directoryName = 'MyAppDir';


You could alternatively make a function that returns the constant.

function URL_KEY() { return 'CurrentURL'; }


Replacing a function (like URL_KEY = function() {...}) might be more of a mental barrier for some.