Usually when building sites I add something like this
var config = {
basePath: '<?php echo BASE_PATH; ?>'
}
Simply so with my static JavaScript files I can do AJAX requests like
var request = config.basePath + 'ajax/get-something';
Does WordPress have a similar variable available to its JavaScript files by default, assuming I add my own scripts at the bottom of all WordPress included stuff?
Thanks